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 use Adsutil.vbs iis to manage scripts

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article focuses on "how to use Adsutil.vbs iis to manage scripts", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor learn how to use Adsutil.vbs iis to manage scripts.

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

Adsutil.vbs is an IIS management utility that handles IIS configuration by using Microsoft Visual Basic Scripting Edition (VBScript) in conjunction with Active Directory services interface (ADSI). The script should be run through the CScript installed with the Windows script host.

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 does not belong to the Administrators group, and then use the runas command to run the script or executable as an administrator. At the command prompt, type runas / profile / user:mymachine\ administrator cmd, open a command window with administrator privileges, and then type cscript.exe ScriptName (including the full path to the script and any parameters).

Use

Cscript.exe adsutil.vbs COMMAND [...]

Cscript.exe adsutil.vbs COMMAND [[...]]

Command description

GET Path

Displays the selected parameters.

SET Path Value

Specify a new value.

ENUM Path "/ P"

Enumerates all parameters of the path. / P enumerates only paths (no data).

ENUM_ALL "/ P"

Enumerate all parameters. / P enumerates only paths (no data).

DELETE Path

Delete a path or parameter.

CREATE Path [KeyType]

Create a path and assign it a KeyType.

APPCREATEINPROC Path

Create an in-process application.

APPCREATEOUTPROC Path

Create an out-of-process application.

APPDELETE Path

Delete the application, if it exists.

APPUNLOAD Path

Uninstall the out-of-process application.

APPGETSTATUS Path

Gets the application status.

FIND Path

Find the path where the parameter is set.

START_SERVER Path

Start the website.

STOP_SERVER Path

Stop the website.

PAUSE_SERVER Path

Pause the website.

CONTINUE_SERVER Path

The website is cancelled and paused.

HELP

Print all available commands.

Be careful

Refers to the node path whose properties you want to set, including the name of the attribute you want to set. For example, to set ServerComment to "Web Server Number 1", the command is as follows:

Adsutil SET w3svc/1/ServerComment "Web Server Number 1"

The next time you open IIS Manager, the name of the Web server will change to "Web Server Number 1".

In order to execute the switch "- s:server name" on the remote computer, you can use this command after any command. (see the first example below. )

Example

Cscript.exe adsutil.vbs GET W3SVC/1/ServerBindings-s:remotecomputer1

Cscript.exe adsutil.vbs SET W3SVC/1/ServerBindings ": 81:"

Cscript.exe adsutil.vbs CREATE W3SVC/1/Root/MyVdir "IIsWebVirtualDir"

Cscript.exe adsutil.vbs START_SERVER W3SVC/1

Cscript.exe adsutil.vbs ENUM / P W3SVC

At this point, I believe you have a deeper understanding of "how to use Adsutil.vbs iis to manage scripts". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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