Microsoft KB Archive/308622

= How To Perform Administration Tasks in IIS from a Command Prompt in Windows 2000 =

Article ID: 308622

Article Last Modified on 10/31/2006

-

APPLIES TO


 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Advanced Server

-



This article was previously published under Q308622



IN THIS TASK

 * SUMMARY
 * Display Tasks
 * Find a Virtual Web Site
 * Display an Administrative Tree
 * Creation Tasks
 * Create a Virtual Web Site
 * Create a Virtual Web Directory
 * Management Tasks
 * Stop a Virtual Site Without Interrupting the Entire Web Service
 * Start a Virtual Site Without Interrupting the Entire Web Service
 * Troubleshooting
 * REFERENCES



SUMMARY
The following article describes how to perform administrative tasks in Internet Information Services (IIS) from the command prompt. There are several tools that aid in the performance of administrative tasks. In this article, these tasks are categorized into three separate task groups; however, all tasks are performed from a command prompt by a user that is a member of the Administrator group in the :\Inetpub\AdminScripts folder.

Note: To open a command prompt to perform any of the tasks that are described in this article:
 * 1) Click Start, click Run, type cmd, and then click OK.
 * 2) Type cd Inetpub\AdminScripts and then press ENTER.

back to the top

Display Tasks
The two commands that you can use for display tasks are findweb and disptree. Another command that you can use to display relevant fields for a particular administrative node in the tree is dispnode.

back to the top

Find a Virtual Web Site
To find a virtual Web site, type the following command from a command prompt:

findweb -c  www. .com

back to the top

Display an Administrative Tree
To display an administrative tree, you can type either of the following commands from a command prompt:

disptree -a IIS://

OR

disptree -a IIS:// /w3svc -n

back to the top

Creation Tasks
The two commands that you can use for creation tasks are mkw3site and mkwebdir; however, the adsutil command-line utility contains several commands that are designed to create an in-process application.

back to the top

Create a Virtual Web Site
To create a virtual Web site, type the following command from a command prompt:

Mkw3site -r RootDirectory :\  -t   -h   www. .com

back to the top

Create a Virtual Web Directory
To create a virtual Web directory, type the following command from a command prompt:

Mkwebdir -c  -w &quot; &quot; -v , :\

OR

Mkwebdir -c  -w &quot; &quot; -v , :\

back to the top

Management Tasks
There are several management commands that deal with everything from the starting and stopping of services to the changing of access properties. This article contains step-by-step instructions for only two management commands, but the following information is a complete list of the other commands:
 * chaccess
 * contftp
 * contsrv
 * contweb
 * dispnode
 * disptree
 * findweb
 * mkw3site
 * mkwebdir
 * pauseftp
 * pausesrv
 * pauseweb
 * startftp
 * startsrv
 * startweb
 * stopftp
 * stopsrv
 * stopweb
 * synciwam

back to the top

Stop a Virtual Site Without Interrupting the Entire Web Service
To stop a virtual site without interrupting the entire Web service, type the following command from a command prompt:

adsutil STOP_SERVER W3SVC/

In this example, for W3SVC/, you could type W3SVC/1 for the default server, or W3SVC/2 for a non-default server.

back to the top

Start a Virtual Site Without Interrupting the Entire Web Service
To start a virtual site without interrupting the entire Web service, type the following command from a command prompt:

adsutil START_SERVER W3SVC/

In this example, for W3SVC/, you could type W3SVC/1 for the default server, or W3SVC/2 for a non-default server.

back to the top

Troubleshooting

 * You have to create the folder for the Virtual Web Directory before you create the directory; the process does not create the folder automatically. If you try to create the directory before you create the folder for it, you will receive an error.
 * You can verify all processes that you perform at the command prompt in the Internet Information Services console. If the console is open when you make a change at the command line, click Action, and then click Refresh to view the changes in the console.

back to the top

