Use Iisftp.vbs to delete an FTP site _vbs

Source: Internet
Author: User
Tags ftp site file transfer protocol metabase

Applied to: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
You can use command-line scripting iisftp.vbs (stored in systemroot\system32\) to remove the IIS File Transfer Protocol (FTP) site configuration on a local or remote computer running a member of the Windows Server 2003 family 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 completely remove the site. Site content is not affected by this command, but users will not be able to access the 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 and any parameters of the script).

This topic includes the following information:

• Syntax: The order in which you type the command and any parameters and options that follow it.
• Parameter: Gives the value of the variable in the command.
• Example: Sample code and a description of the result.

Grammar

Iisftp/delete Ftpsite [Ftpsite ...] [/s Computer [/u [domain\]user/p Password]]
Parameters
Ftpsite
Required. Specifies the site name or metabase path of the FTP site. The FTP site must be uniquely identified. If more than one FTP site has the same descriptive name, you must use the metabase path to identify the FTP site.
/s Computer
Runs the script on the specified remote computer. Type the name or IP address of the computer without the backslash. By default, the script runs on the local computer.
/u [domain\]user
Runs the script with the permissions 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 of 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 FTP site configuration on the local computer. The contents of the "Downloads" FTP site remain unchanged, but users cannot access the content. The/s parameter is ignored because the local computer is the default setting. The/U and/p parameters are ignored because the current user of the local computer must be logged on as an administrator to run the command.

Copy Code code as follows:

Iisftp/delete Downloads

In response, IIsFtp displays the following message indicating that the site configuration has been deleted and that the FTP site is identified by its metabase path. The metabase path is equivalent in IIS to the entries in the system registry.
Connecting to server ... Done.
Server msftpsvc/2109607139 has been DELETED.

Example 2

The following example deletes multiple FTP site configurations from a remote computer. The "Downloads", "Drivers" and "Library" FTP sites are located on SVR01. This command identifies the first two sites by name, by their metabase path "msftpsvc/1932955329" to identify the "Logo" FTP site. In addition, the command uses the/s parameter to specify the remote computer, and the/U and/P parameters run the command with the user's administrator account permissions.

Copy Code code as follows:

Iisftp/delete Downloads Drivers msftpsvc/2109607139/s svr01/u tom/p p@# #word

In response, IIsFtp displays the following message indicating that the site configuration has been deleted and that each FTP site is identified by its metabase path.

Connecting to server ... Done.
Server msftpsvc/2109607139 has been DELETED.
Server msftpsvc/1879143292 has been DELETED.
Server msftpsvc/1932955329 has been DELETED.

The advantage of using scripts is that you can perform operations in bulk. Combined with bat and planning tasks, it's more perfect.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.