Listing FTP Sites Using Iisftp.vbs
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
Administrators frequently need to check the status and/or properties of their File Transfer Protocol (FTP) sites. To check the status of your site, you can use the command-line script iisftp.vbs, which is stored in systemroot\System32, to query or list FTP sites on remote or local computers.
Important
You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /User:MyComputer</STRONG>Administrator cmd to open a command window with administrator rights and then type cscript.exe ScriptName (include the script's full path and any parameters).
This topic includes the following information:
Syntax: The order in which you type a command and any arguments and options that follow it.
Parameters: The values that are given to variables in the command.
Examples: Sample code and an explanation of the results.
Syntax
iisftp/query [FTPSite [FTPSite...]]
[/s Computer [/u [Domain**\]User/p** password]]
Parameters
FTPSite
Required. Specifies the site name or metabase path of the FTP site. FTP sites 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 computer name or IP address without backslashes. By default, the script runs on the local computer.
/u [Domain**\**]User
Runs the script with the permissions of the specified user account. This 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 of the user account that is specified in the /u parameter.
Note
The query output includes the site name, metabase path, port, status, and the IP address, or All to indicate all unassigned addresses.
Examples
Example 1:
The following example displays the FTP sites that are on the local computer. Omitting the FTPSite parameter limits the search to the local computer, eliminating the need for the /s parameter. The /u and /p parameters are omitted because the user running the command prompt must be logged on as an administrator for the local machine.
iisftp /query
In response, iisftp displays all of the IIS FTP sites that are on the local computer, including site names, metabase paths, status, IP addresses, and ports.
Connecting to server ...Done.
Site Name (Metabase Path) Status IP Port
Default FTP Site (MSFTPSVC/1) STARTED ALL 21
My Site (MSFTPSVC/858812021) STOPPED ALL 21
Drivers (MSFTPSVC/1932955329) STARTED 172.30.163.249 21
Downloads (MSFTPSVC/1879143292) STARTED ALL 25
Library (MSFTPSVC/2109607139) STARTED 172.30.163.126 21
Example 2:
The following example searches for the "Download" FTP site on the remote computer, SVR01. It uses the /s parameter to specify the remote computer, as well as the /u and /p parameters to run the script with the permissions of the user's administrator account.
iisftp /query Download /s SVR01 /u Admin6 /p A76QVJ32#
In response, iisftp displays the "Download" FTP site on SVR01.
Site Name (Metabase Path) Status IP Port
Downloads (MSFTPSVC/1879143292) STARTED ALL 25
Example 3:
The following example displays the status of the "Downloads" and "Drivers" FTP sites on the local computer. It uses site names to identify the FTP sites, although metabase paths are also valid.
iisftp /query Downloads Drivers
In response, iisftp displays the status of the "Downloads" and "Drivers" FTP sites.
Site Name (Metabase Path) Status IP Port
Downloads (MSFTPSVC/1879143292) STARTED ALL 25
Drivers (MSFTPSVC/1932955329) STARTED 172.30.163.249 21
Related Information
For information about creating FTP configurations, see Creating FTP Sites Using Iisftp.vbs.
For information about deleting FTP configurations, see Deleting FTP Sites Using Iisftp.vbs.
For information about starting FTP sites, see Starting FTP Sites Using Iisftp.vbs.
For information about stopping FTP sites, see Stopping FTP Sites Using Iisftp.vbs.
For information about pausing FTP sites, see Pausing FTP Sites Using Iisftp.vbs.
For information about setting user isolation, see Setting Active Directory User Isolation Using Iisftp.vbs.