Article ID: 308622 - Last Review: October 31, 2006 - Revision: 3.3 How To Perform Administration Tasks in IIS from a Command Prompt in Windows 2000This article was previously published under Q308622 On This PageSUMMARY
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 DriveLetter:\Inetpub\AdminScripts folder. Note: To open a command prompt to perform any of the tasks that are described in this article:
Display TasksThe 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.Find a Virtual Web SiteTo find a virtual Web site, type the following command from a command prompt:
findweb -c MachineName www.DomainName.com
Display an Administrative TreeTo display an administrative tree, you can type either of the following commands from a command prompt:
disptree -a IIS://ComputerName
OR
disptree -a IIS://LocalHost/w3svc -n
Creation TasksThe 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.Create a Virtual Web SiteTo create a virtual Web site, type the following command from a command prompt:
Mkw3site -r RootDirectory DriveLetter:\FolderName -t NewServerName -h HostName www.MyNewWebsite.com
Create a Virtual Web DirectoryTo create a virtual Web directory, type the following command from a command prompt:
Mkwebdir -c ComputerName -w "WebSiteName" -v DirectoryName,DriveLetter:\FolderName
OR
Mkwebdir -c LocalHost -w "WebSiteName" -v DirectoryName,DriveLetter:\FolderName Management TasksThere 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:
Stop a Virtual Site Without Interrupting the Entire Web ServiceTo stop a virtual site without interrupting the entire Web service, type the following command from a command prompt:
adsutil STOP_SERVER W3SVC/Server#
In this example, for W3SVC/Server#, you could type W3SVC/1 for the default server, or W3SVC/2 for a non-default server.Start a Virtual Site Without Interrupting the Entire Web ServiceTo start a virtual site without interrupting the entire Web service, type the following command from a command prompt:
adsutil START_SERVER W3SVC/Server#
In this example, for W3SVC/Server#, you could type W3SVC/1 for the default server, or W3SVC/2 for a non-default server.Troubleshooting
REFERENCESFor additional informationabout IIS administration, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
308169
(http://support.microsoft.com/kb/308169/EN-US/
)
How To Remotely Administer Internet Information Services
284930
(http://support.microsoft.com/kb/284930/EN-US/
)
Issues Administering IIS 5.0 from IIS 4.0 MMC
| Article Translations
|
Back to the top
