Apply to: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
If your File Transfer Protocol (FTP) site does not work properly, or if the FTP site is slow or unresponsive, stop and restart the FTP site can clear temporary software issues, such as an error worker process.
In similar cases, you can use command line scripts (stored in systemroot\System32) to stop the FTP site from responding. The content of the site remains unchanged, but the user 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 executable files. As a security best practice, log on to the computer with an account that does not belong to the Administrators group, and then use the runas command to run the scripts and executables as administrator. At the command prompt, type runas /profile /User:MyComputer\Administrator cmd, open a command window with administrator privileges, and type (including the full path to the script and any parameters).
This topic includes the following information:
• Syntax: The order that must be taken when typing a command and any parameters and options that follow it.
• Parameters: Assign the value of the variable in the command.
•Example: Sample code and description of the results.
grammar
iisftp/stop FTPSite [FTPSite...][ /s Computer [ /u [Domain\]User /p Password]]
parameter
FTPSite
Required. Specify the site name or configure the database path for the FTP site. The FTP site must be uniquely identified. If multiple FTP sites have the same descriptive name, you must use the configuration database path to identify the FTP site.
/s Computer
Run the script on the specified remote computer. Type the computer name or IP address without backslashes. By default, the script runs on the local computer.
/u [Domain\]User
Run 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 example, since the server is a local computer, 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.
iisftp /stop Drivers
In response, iisftp displays the following message confirming that the site has stopped and identifies it with the site's configuration database path: The configuration database path is equivalent to a entries in the system registry in IIS.
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 configuration database path "MSFTPSVC/2109607139" to identify the "Downloads" site and the "Drivers" site with its name. In addition, this command uses the /s parameter to specify the remote computer, and uses the /u and /p parameters to run the command with the user's administrator account permissions.
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 identifies each site with the site's configuration database path:
Connecting to server ...Done.
Server MSFTPSVC/2109607139 has been STOPPED.
Server MSFTPSVC/1879143292 has been STOPPED.
The advantage of using scripts is that operations can be performed in batches. Combining bat and planning tasks will be more perfect