How to stop an FTP site using iisftp.vbs _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
If your File Transfer Protocol (FTP) site does not work correctly, or if the FTP site is slow or unresponsive, stopping and restarting the FTP site can clear up temporary software problems, such as an error worker process.
In similar cases, you can use command-line scripting iisftp.vbs (stored in systemroot\system32) to stop the FTP site from responding. The content of the site is unchanged, but users will not be able to access it until the site is restarted.

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/stop 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 stops the "Drivers" FTP site on the local computer. This command identifies the site with the site name. In this case, the/s parameter is ignored because the server is the local computer. 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/stop Drivers

In response, IIsFtp displays the following message confirming that the site has stopped and identifying it with the site's metabase path: The metabase path is equivalent in IIS to the entries in the system registry.
Connecting to server ... Done.
Server msftpsvc/1879143292 has been STOPPED.

Example 2:

The following example stops the "Downloads" and "Drivers" FTP sites on the remote computer SVR01. This command uses its metabase path "msftpsvc/2109607139" to identify the "Downloads" site, identifying the "Drivers" site by name. In addition, the command uses the/s parameter to specify the remote computer, using the/U and/P parameters to run the command with the user's administrator account permissions.

Copy Code code as follows:

Iisftp/stop msftpsvc/2109607139 drivers/s svr01/u tom/p p## #word

In response, IIsFtp displays the following message confirming that the site has been stopped and identifying each site with the site's metabase path:
Connecting to server ... Done.
Server msftpsvc/2109607139 has been STOPPED.
Server msftpsvc/1879143292 has been STOPPED.

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.