How to execute management tasks in Internet Information Service (IIS) from a command prompt. There are several tools to help manage task execution. In this article, these tasks are divided into three independent task groups; however, all tasks are executed by members of the Administrator group in the drive letter:/inetpub/adminscripts folder.
Note: To open a command prompt to execute any tasks described in this article, follow these steps:
Click Start, click Run, type cmd, and click OK.
Type CD inetpub/adminscripts and then press Enter.
Show task
The two commands used to display the task are findweb and disptree. Another command that can be used to display the related fields of a specific management node in the tree is dispnode.
Search for virtual web sites
To find a virtual web site, enter the following command at a command prompt:
Findweb-C computer name www. Domain Name. com
Display management tree
To display the management tree, type one of the following two commands at a command prompt:
Disptree-a iis: // computer name
Or
Disptree-a iis: // local host/W3SVC-n
Create a task
The two commands that can be used to create a task are mkw3site and mkwebdir. However, the adsutil command line utility contains several commands designed to create in-process applications.
Create a virtual web site
To create a virtual web site, enter the following command at a command prompt:
Mkw3site-r root directory drive letter:/folder name-t new server name-H host name www. My new Web site. com
Create a virtual web directory
To create a virtual web directory, enter the following command at the command prompt:
Mkwebdir-C computer name-W "web site name"-V directory name, drive letter:/folder name
Or
Mkwebdir-C local host-W "web site name"-V directory name, drive letter:/folder name
Manage tasks
There are several management commands that can be used to execute various tasks, including starting and stopping services and changing access properties. This article provides step-by-step guidance for only two management commands, and all other commands are listed below:
Chaccess
Contftp
Contsrv
Contweb
Dispnode
Disptree
Findweb
Mkw3site
Mkwebdir
Pauseftp
Pausesrv
Pauseweb
Startftp
Startsrv
Startweb
Stopftp
Stopsrv
Stopweb
Synciwam
Stop a virtual site without interrupting the entire Web Service
To stop a virtual site without interrupting the entire web service, enter the following command at the command prompt:
Adsutil stop_server w3svc/server number
In this example, for the w3svc/server number, you can type w3svc/1 to represent the default server, or type w3svc/2 to represent the foobar server.
Start a virtual site without interrupting the entire Web Service
To start a virtual site without interrupting the entire web service, enter the following command at the command prompt:
Adsutil start_server w3svc/server number
In this example, for the w3svc/server number, you can type w3svc/1 to represent the default server, or type w3svc/2 to represent the foobar server.
Troubleshooting
Before creating a virtual web directory, you must create a folder for this directory. The process does not automatically create this folder. If you create a directory before creating a folder, you will receive an error message.
You can check all the processes that you run at a command prompt on the "Internet Information Service" console. If the console opens when you make changes in the command line, click operation, and then click Refresh to view the changes in the console.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.