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 iisweb.vbs to delete a website

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

Share

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

This article mainly explains "how to delete a website using iisweb.vbs". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to delete a website using iisweb.vbs".

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

You can use the command line script iisweb.vbs (stored in systemroot\ System32) to delete the IIS site configuration on a local or remote computer running a Windows Server 2003 family member with IIS 6.0.

This command is useful if you plan to move the site to a new URL or server, or if you want to delete the site completely. Site content is not affected by this command, but users will not be able to access the site.

Important matters of Important

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 / delete 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 deletes a single Web site configuration on the local computer. Because the local computer is the default, the / s parameter is ignored. 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 / delete "My First Novel"

In response, iisweb displays the following message indicating that the site configuration has been deleted and that the website is identified by its configuration database path:

Connecting to server... Done.

Server W3SVC/409413479 has been DELETED.

Example 2:

The following example removes multiple site configurations from a remote computer. The "Finance", "Work Group" and "Logo" sites are located in SRV01. This command identifies the first two sites by name, and identifies the "Logo" site by its configuration database path "W3SVC/79116006". 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 / delete Finance "Work Group" W3SVC/79116006 / s SRV01 / u Alice / p p@##word

In response, iisweb displays the following message indicating that the site configuration has been deleted and that each site is identified by its configuration database path:

Connecting to server... Done.

Server W3SVC/1977437537 has been DELETED.

Server W3SVC/1509060625 has been DELETED.

Server W3SVC/79116006 has been DELETED.

For you to supplement the batch deletion method:

The copy code is as follows:

Iisweb / delete "My First Novel"

Iisweb / delete "My First Nove2"

Iisweb / delete "My First Nove3"

Just save the above code as bat.

You can also schedule tasks and execute them on a regular basis.

Thank you for your reading, the above is the content of "how to use iisweb.vbs to delete a website", after the study of this article, I believe you have a deeper understanding of how to use iisweb.vbs to delete a website, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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