I see how to change, read, write browse in the directory tab, but I can't find anything about the 'Index this resource' box?
This property can be modified by using ADSI; By default on IIS the property is not defined and defaults to enabled. Changing the Index this Resource in the Internet Service Manager causes this property to be created.
The property is called DontLog and it is a boolean value defined in a DWORD value with the following values:
0 = Log the requests
1 = Do not log requests
You can read the property like this:
C:\Inetpub\AdminScripts>cscript adsutil.vbs get w3svc/1/root/dontlog
dontlog : (BOOLEAN) True
If the value has never been set you will see this as the result of the above command.
The parameter "dontlog" is not set at this node.
To set the value use the following syntax where 1 = Do not log, and 0 = Log
C:\Inetpub\AdminScripts>cscript adsutil.vbs set w3svc/1/root/dontlog 1 dontlog : (BOOLEAN) True
In your own scripts you can adjust this property like this: set IISOBJ = GetObject("IIS://localhost/w3svc/1/root")
IISOBJ.DontLog = 1 ' Do not log requests.
set IIOBJ = nothing |