Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to start a website using iisweb.vbs start

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge of "how to use iisweb.vbs start to start a website". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Apply to: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

IIS automatically launches a Web site when it is created, unless the administrator explicitly disables it with the / dontstart parameter. The administrator may disable automatic startup, for example, by setting aside time for the site to be added to the DNS.

The administrator may also pause or stop the site for troubleshooting purposes. In similar cases, you can use the command line script iisweb.vbs (stored in systemroot\ System32) to start or restart the Web site.

Important matters

Only members of the Administrators group on the local computer can run scripts and executables. As a security best practice, log on to the computer using an account that is not part of the Administrators group, and then use the runas command to run scripts and executables as an administrator. At the command prompt, type runas / profile / User:MyComputer\ Administrator cmd, open a command window with administrator privileges, and then type cscript.exeScriptName (including the full path to the script and any parameters).

This topic includes the following information:

Syntax: the order in which you must type a command and any parameters and options that follow it.

Parameter: the value assigned to the variable in the command.

Example: sample code and a description of the result.

Grammar

Iisweb/start WebSite [WebSite...] [/ s Computer [/ u [Domain\] User / p Password]]

Parameters.

WebSite

Necessary. Specify a site name or configure a database path for the site. The website must be uniquely identified. If multiple sites have the same descriptive name, you must use the configuration database path to identify the site.

/ s Computer

Runs the script on the specified remote computer. Type the computer name or IP address without a backslash. By default, the script runs on the local computer.

/ u [Domain\] User

Runs the script with the privileges of the specified user account. The account must be a member of the Administrators group on the remote computer. By default, the script runs with the permissions of the current user on the local computer.

/ p Password

Specifies the password for the user account specified in the / u parameter.

Example

Example 1:

The following example starts the Products Web site on the local computer. This command identifies the site by its name. In this case, the / s parameter is ignored because the server is the local computer. Because the current user of the local computer must be logged in as an administrator to run the command, the / u and / p parameters are ignored.

The copy code is as follows:

Iisweb / start Products

In response, iisweb displays the following message confirming that the site has been started and identifying it with the site's configuration database path:

Connecting to server... Done.

Server W3SVC/1977437537 has been STARTED.

Example 2:

The following example starts the Products and Marketing Web sites on the remote computer SVR01. The command identifies the site "Products" by its configuration database path "W3SVC/1509060225" and the site "Marketing" by its name. In addition, the command uses the / s parameter to specify the remote computer and the / u and / p parameters to run the command with the user's administrator account privileges.

The copy code is as follows:

Iisweb / start w3svc/1509060225 Marketing / s SVR01 / u Alice / p p@##word

In response, iisweb displays the following message confirming that these sites have been started and identifying it with the configuration database path for each site:

Connecting to server... Done.

Server W3SVC/1509060225 has been STARTED.

Server W3SVC/1977437537 has been STARTED.

Friendly reminder:

How the above command can not be run can be executed regsvr32 wshom.ocx.

We can also save the above command as bat, and then execute it regularly through task scheduling.

This is the end of "how to use iisweb.vbs start to start a website". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report