Use Iisftp.vbs to list the methods of the FTP site _vbs

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

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

Administrators often need to check the status and/or properties of their file Transfer Protocol (FTP) sites. To check the status of a site, you can use command-line scripting iisftp.vbs (stored in systemroot\system32) to query or list FTP sites on remote or local computers.

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/query [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.

Note
The query output results include the site name, metabase path, port, status, and IP address, or use all to represent all unassigned addresses.

Example

Example 1:
The following example displays the FTP site on the local computer. If you omit the Ftpsite parameter, the search for the local computer is restricted and the/s parameter is no longer required. The/U and/P parameters can be ignored because the user who is running the command prompt must be logged on as an administrator on the local computer.

Copy Code code as follows:

Iisftp/query

In response, IIsFtp displays all IIS FTP sites on the local computer, including the site name, metabase path, status, IP address, and port.

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 the FTP site "Download" on the remote computer SVR01. It uses the/s parameter to specify the remote computer, using the/U and/P parameters to run the script with the user's administrator account permissions.

Copy Code code as follows:

Iisftp/query download/s svr01/u admin6/p a76qvj32#

In response, IIsFtp displays the FTP site "Downloads" 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 FTP site "Downloads" and "Drivers" on the local computer. Although the metabase path is also valid, it uses the site name to identify the FTP site.

Copy Code code as follows:

Iisftp/query Downloads Drivers

In response, IIsFtp displays the FTP site "Downloads" and "Drivers".

Site Name (Metabase Path) Status IP Port
Downloads (msftpsvc/1879143292) started all 25
Drivers (msftpsvc/1932955329) started 172.30.163.249 21

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.