Execute the management task in IIS from the command prompt

xiaoxiao2021-03-06  39

How to perform the management tasks in Internet Information Services (IIS) from the command prompt. There are several tools to help manage tasks. In this article, these tasks are divided into three independent task groups; however, all tasks are executed by group members of the Administrator group in the drive letter: / inetpub / adminsscripts folder.

Note: To open a command prompt to perform any tasks introduced in this article, follow these steps:

Click Start, click Run, type CMD, and then click OK.

Type CD INETPUB / ADMINSCRIPTS and press ENTER.

Display task

Two commands that can be used to display tasks are FindWeb and Disptree. Another command that can be used to display the relevant domains in a particular management node in the tree is DispNode.

Find virtual Web site

To find a virtual Web site, type the following command at the command prompt:

Findweb -c computer name www. domain name .com

Display management tree

To display the management tree, you can type one of the following two commands at the command prompt:

Disptree -a IIS: // Computer Name

or

Disptree -a IIS: // Local host / W3SVC -N

Create tasks

Two commands that can be used to create tasks are MKW3Site and MkWebDir; however, the Adsutil command line utility contains several designs to create an application within the process.

Create a virtual Web site

To create a virtual Web site, type the following command at the 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, type the following command at the command prompt:

MkWebDir-C computer name -W "Web site name" -V directory name, drive device: / folder name

or

Mkwebdir -c Local Host-W "Web Site Name" -V Directory Name, Drive Man: / Folder Name

Management task

Several management commands can be used to perform various tasks such as startup and stop service to change access attributes. This article only provides a step-by-step guide for two management commands, and all other commands are listed below:

Chaccess

Contftp

Contrasrv

Contweb

Dispnode

Disptree

Findweb

Mkw3site

Mkwebdir

PAUSEFTP

Pausesrv

Pauseweb

StartFTP

Startsrv

STARTWEB

StopFTP

Stopsrv

StopWeb

Synciwam

Stop the virtual site without interruption of the entire web service

If you want to stop the virtual site without interrupting the entire web service, type the following command from the command prompt:

AdsuTil Stop_Server W3SVC / Server

In this example, for W3SVC / Server, you can type W3SVC / 1 represents the default server, or type W3SVC / 2 represents the FOOBAR server.

Start the virtual site without interruption of the entire Web service

If you want to start the virtual site without interrupting the entire web service, type the following command from the command prompt:

AdsuTil Start_server W3SVC / Server

In this example, for W3SVC / Server, you can type W3SVC / 1 represents the default server, or type W3SVC / 2 represents the FOOBAR server.

Troubleshooting

Create a folder for that directory before creating a Virtual Web Directory; the process does not automatically create this folder. If you create a directory before creating a folder, an error message will be received. You can check all the processes that you execute under the command prompt at the Internet Information Console. If the console is turned on when the command line is changed, click Operation, and then click Refresh to view these changes in the console.

转载请注明原文地址:https://www.9cbs.com/read-52217.html

New Post(0)