Use Iisftp.vbs to set active Directory user isolation _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

You can use command-line scripting iisftp.vbs (stored in systemroot\system32) to query and set the Active Directory directory service properties of the user's File Transfer Protocol (FTP) home directory. For more information about user isolation, see isolating FTP users.

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/getadprop UserID [/s Computer [/u [domain\]user/p Password]]

Iisftp/setadprop UserID {msiis-ftpdir|msiis-ftproot} propertyvalue [/s Computer [/u [domain\]user/p Password]]

Parameters
/GetADProp

Returns the property values for a specific Active Directory user.

/SetADProp

Sets the property values for a specific Active Directory user.

Userid

Required. Specifies the login ID for Active Directory users.

Msiis-ftpdir|msiis-ftproot

Required to set the home directory properties. Specify quarantine at the directory level or at the root level.

PropertyValue

Required to set the home directory properties. Specifies the value of the home directory and relative paths.

/s Computer

Specifies the name or IP address of the remote computer (without a backslash). The default is the local computer.

/u [domain\]user

Connect to Active Directory with the permissions of the specified user account in the user or domain\user format. 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 returns the Active Directory attribute for user "Bsmith" on the local computer.

Copy Code code as follows:

Iisftp/getadprop Bsmith

In response, IIsFtp displays the following message followed by the Active Directory property for Bsmith in the default domain. In the example, the server "indicates the computer name on which drive D: is located, the" site name "represents the name assigned to the FTP site, and" Metabase Path "represents the metabase key specified by IIS," IP "is not assigned by default, and" Port "is set by default to "Root" is the directory where FTP files reside, "IsoMode" is set to "FTPRoot", and "Status" is set to "started" by default.

Connecting to server ... Done.
Server = Ftpserver
Site Name = Smittys
Metabase Path = msftpsvc/1452008083
IP = All Unassigned
Port = 21
Root = D:\Public\Archives
IsoMode = FTPRoot
Status = Started

Example 2:

The following example sets the home directory properties in the Active directory user object properties for user "Sales\mjones" on the remote computer.

Copy Code code as follows:

Iisftp/setadprop sales\mjones ftpdir mikesdir/s svr16/u sales\admin6/p

In response, IIsFtp displays the following message, including the Active Directory property of Mjones. In the example, the server "indicates the computer name on which drive D: is located, the" site name "represents the name assigned to the FTP site, and" Metabase Path "represents the metabase key specified by IIS," IP "is not assigned by default, and" Port "is set by default to "Root" is the directory where FTP files reside, "IsoMode" is set to "FTPDir", and "Status" is set to "started" by default.

Connecting to server ... Done.
Server = SVR16
Site Name = Mikesdir
Metabase Path = msftpsvc/1452004045
IP = All Unassigned
Port = 21
Root = D:\Public\Archives
IsoMode = FTPDir
Status = Started

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.