[This is preliminary documentation and subject to change]

# IIS Administration Script Utility (adsutil)

Summary:

This is an IIS administration utility that uses VBScript with Active Directory Service Interfaces (ADSI) to manipulate the IIS configuration. This script should be run using CScript, which is installed with Windows Script Host.

Usage:

Cscript.exe adsutil.vbs COMMAND <path> [<param>...]

Cscript.exe adsutil.vbs COMMAND [<path> [<parameters>...]]

Commands:

GET Path | Display chosen parameter.
SET Path Value | Assign a new value.
ENUM path "/P" | Enumerate all parameters for the path. /P - Enumerate the paths only (no data).
ENUM_ALL "/P" | Enumerate all parameters. /P - Enumerate the paths only (no data).
DELETE path | Delete the path or parameter.
CREATE path [KeyType] | Create the path and assign it the KeyType.
APPCREATEINPROC Path | Create an in-process application.
APPCREATEOUTPROC Path | Create an out-of-process application.
APPDELETE Path | Delete the application (if present).
APPUNLOAD Path | Unload an out-of-process application.
APPGETSTATUS Path | Get status of the application.
FIND Path | Find the paths where a parameter is set.
START_SERVER Path | Starts the server.
STOP_SERVER Path | Stop the Web site.
PAUSE_SERVER Path | Pause the Web site.
CONTINUE_SERVER Path | Unpauses the Web site.
HELP | Prints all available commands.

Notes

- <Path> is the path of the node at which you are setting the property combined with the name of the property you are setting. For example, if you want to set the ServerComment for Web server number 1, the command would be as follows:

- adsutil SET w3svc/1/ServerComment "Web Server Number 1"

  The next time the IIS snap-in is opened, it will reflect the name of the Web server as "Web Server Number 1"

- The switch "-s:server name" can be used after any command to execute the command on a remote computer. (See first example below.)

Examples:

Cscript.exe adsutil.vbs GET W3SVC/1/ServerBindings -s:remotecomputer1

Cscript.exe adsutil.vbs SET W3SVC/1/ServerBindings ":81:"

Cscript.exe adsutil.vbs CREATE W3SVC/1/Root/MyVdir "IIsWebVirtualDir"

Cscript.exe adsutil.vbs START_SERVER W3SVC/1

Cscript.exe adsutil.vbs ENUM /P W3SVC

© 1997-2001 Microsoft Corporation. All rights reserved.