' Connect to an object for the Web service, Web site, virtual directory or Web file. ' In this case, we're connecting to the root virtual directory of the Default Web Site. Set IIsWebVirtualDirObj = GetObject("IIS://localhost/W3SVC/1/Root") WScript.Echo("Before: AppAllowDebugging = " & IIsWebVirtualDirObj.AppAllowDebugging) ' There are multiple ways to set a property: 'IIsWebVirtualDirObj.AppAllowDebugging = True IIsWebVirtualDirObj.Put "AppAllowDebugging", True IIsWebVirtualDirObj.SetInfo IIsWebVirtualDirObj.GetInfo WScript.Echo("After: AppAllowDebugging = " & IIsWebVirtualDirObj.AppAllowDebugging)