Iisftp.vbs: II 
			FTP site management script
			
			
			
			
			This page is from Microsoft
			
				Creates, deletes, and lists FTP sites on local and remote 
				servers running Windows Server 2003 with Internet Information 
				Services (IIS) 6.0. Also sets and gets user isolation 
				properties, starts, stops, and pauses FTP sites.
			iisftp /create
			
				This command creates FTP sites on local and remote servers.
			
				 
			Syntax
			
				iisftp /createPath SiteName [/b Port] 
				[/i IPAddress] [/dontstart] [/isolation {ActiveDirectory 
				| Local}  [/domain DomainName /Admin 
				[Domain\]User /AdminPwdPassword]] [/s Computer
				[/u [Domain\]User/p [Password]]]
			Parameters
			
				
					
						
							Path
						
							Required. Specifies the location of content files 
							for the FTP site. Enter a path to a local directory, 
							such as C:\Projects\Docs. If any directories in the 
							path do not exist, then Iisftp.vbs creates the 
							directories. The Path parameter must 
							immediately precede the SiteName parameter. 
							Otherwise, Iisftp.vbs does not interpret the site 
							information correctly.
					 
					
						
							SiteName
						
							Required. Specifies a name for the FTP site.
					 
					
						
							/bPort
						
							Specifies a TCP port number for the FTP site. The 
							default is 21.
					 
					
						
							/iIPAddress
						
							Specifies an IP address for the FTP site. The 
							default is All Unassigned, which assigns to 
							the site all of the IP addresses on the computer 
							that are not assigned to other sites. Only one site 
							on each IIS server can be set to All Unassigned.
					 
					
						
							/dontstart
						
							Indicates that the FTP site does not start 
							automatically as soon as it is created. By default, 
							IIS starts the FTP site when the /create 
							command completes successfully.
					 
					
						
							/isolation {ActiveDirectory | Local}
						
						
							Provides for one of two user isolation modes, 
							ActiveDirectory and Local. If the/isolation 
							switch is not present, the site will not use user 
							isolation.
					 
					
						
							/domainDomainName
						
							Only valid when the /isolation switch is set 
							to ActiveDirectory, this value is the name of 
							the Active Directory domain.
					 
					
						
							/Admin [Domain\]User
						
							Only valid when the /isolation switch is set 
							to ActiveDirectory, this value is the name of 
							the administrator in the User, Domain\User, 
							or User@Domain format.
					 
					
						
							/AdminPwdPassword
						
							Only valid when the /isolation switch is set 
							to ActiveDirectory, this value is the 
							administrator's password.
					 
					
						
							/sComputer
						
							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.
					 
					
						
							/pPassword
						
							Specifies the password of the user account specified 
							in the /u parameter. If you omit this 
							parameter, the script prompts you for the password 
							and obscures the text you type.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- To perform this procedure, you must be a member of the 
				Administrators group on the local computer, or you must have 
				been delegated the appropriate authority. If the computer is 
				joined to a domain, members of the Domain Admins group might be 
				able to perform this procedure. As a security best practice, 
				consider using Run as to perform this procedure. 
- Iisftp.vbs does not verify the port number or IP address of 
				an FTP site, and it does not verify that these bindings are 
				unique within the server. If you create a site with invalid or 
				conflicting bindings, the site will not start.
- When you use Iisftp.vbs to create a new FTP site, you 
				specify only the basic properties needed to create the site and 
				identify its contents. Iisftp.vbs uses the same default 
				properties that IIS uses when establishing new FTP sites, and 
				adheres to the same rules for inheriting properties. To 
				configure the more advanced properties of the site, use IIS 
				Manager.
Examples
			
				The following examples show how to use iisftp /create in 
				specific situations. 
			To create an FTP site on the local computer
			
				The following command creates an FTP site named Archive on the 
				local computer and associates it with content in the 
				D:\Public\Archives directory. The command omits all optional 
				parameters and accepts the default values. The Archives 
				subdirectory does not exist, but Iisftp.vbs will add it to the 
				Public directory.
iisftp /create D:\Public\Archives Archive
				In response, Iisftp.vbs displays a success message and 
				displays the basic properties of the new FTP site:
				
					
						
							
								
									
										
											
				Connecting to server ...Done.
Server        = RESKIT
Site Name     = Archive
Metabase Path = MSFTPSVC/1452008083
IP            = ALL UNASSIGNED
Port          = 21
Root          = D:\Public\Archives
Status        = STARTED
											 
										 
									 
								 
							 
						 
					 
				 
				The display shows that Iisftp.vbs assigned the default values 
				for the site, including the port number, the ALL UNASSIGNED IP 
				address and the automatic start. It also added an Archives 
				subdirectory to the D:\Public directory.
				Note that the metabase path that IIS generates for the new 
				FTP site is composed of MSFTPSVC and a randomly generated 
				identifier.
			To create an FTP site on a remote computer
			
				
				The following command creates the Drivers FTP site on the Svr16 
				remote computer and associates the site with files in the 
				C:\Public\Download directory on Svr16. The command uses the /i 
				parameter to specify an IP address for the site and the /dontstart 
				parameter to prevent IIS from starting the site automatically. 
				It also uses the /s parameter to identify the remote 
				computer and the /u and /p parameters to run the 
				script with the permissions of the user's Administrator account.
				
				iisftp /create C:\Public\Download Drivers /i 172.31.69.150 /dontstart 
				/s Svr16 /u Admin6 /p p@ssWor##
				In response, Iisftp.vbs displays a success message and 
				displays the basic properties of the new FTP site:
				
					
						
							
								
									
										
											
				Connecting to server ...Done.
Server        = SVR16
Site Name     = Drivers
Metabase Path = MSFTPSVC/1932955329
IP            = 172.31.69.150
Port          = 21
Root          = C:\Public\Download
Status        = STOPPED
											 
										 
									 
								 
							 
						 
					 
				 
			 
			iisftp /delete, /start, /stop, /pause
			
				These commands delete, start, stop, and pause FTP sites on local 
				and remote servers.
			
				 
			Syntax
			
				iisftp[.vbs] {/delete | /start | 
				/stop | /pause}FTPSite [FTPSite...][/sComputer 
				[/u [Domain\]User [/pPassword]]]
			Parameters
			
				
					
						
							FTPSite
						
							Required. Specifies the site name or metabase path 
							of the FTP site. At least one site is required. 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.
					 
					
						
							/sComputer
						
							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.
					 
					
						
							/pPassword
						
							Specifies the password of the user account specified 
							in the /u parameter. If you omit this 
							parameter, the script prompts you for the password 
							and obscures the text you type.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- To perform this procedure, you must be a member of the 
				Administrators group on the local computer, or you must have 
				been delegated the appropriate authority. If the computer is 
				joined to a domain, members of the Domain Admins group might be 
				able to perform this procedure. As a security best practice, 
				consider using Run as to perform this procedure. 
Examples
			
				The following examples show how to use iisftp /delete, 
				/start, /stop, and /pause in specific 
				situations. 
			To delete an FTP site
			
				The following command deletes the Downloads FTP site from the 
				local computer:
iisftp /delete Downloads
				In response, Iisftp.vbs displays a success message in which 
				it identifies the FTP site by its metabase path, 
				MSFTPSVC/1452008083:
				Server MSFTPSVC/1452008083 has 
				been DELETED.
			To delete multiple FTP sites on a remote computer
			
				
				The following command deletes the Downloads, Drivers, and 
				Library sites from Svr01, a remote server. The command 
				identifies the Library FTP site by its metabase path, 
				MSFTPSVC/2109607139.
				iisftp /delete Downloads Drivers 
				MSFTPSVC/2109607139 /s Svr01
				In response, Iisftp.vbs displays a success message in which 
				it identifies each FTP site by its metabase path:
				
					
						
				Server MSFTPSVC/2109607139 has been DELETED.
Server MSFTPSVC/1879143292 has been DELETED.
Server MSFTPSVC/1932955329 has been DELETED.
						 
					 
				 
			 
			To restart an FTP site on a remote computer
			
				
				The following commands stop and then start the Drivers FTP site 
				on the Srv12 remote computer. The commands identify the site by 
				its metabase path, MSFTPSVC/1879143292. The commands use the 
				/s parameter to specify the remote computer. In this 
				example, the /u and /p parameters are omitted 
				because the current user of the local computer is also an 
				administrator of the remote computer.
				iisftp /stop 
				MSFTPSVC/1879143292 /s Srv12
				iisftp /start MSFTPSVC/1879143292 /s Srv12
			 
			To pause and restart a remote FTP site
			
				
				The following commands pause and then restart the Updates FTP 
				site on the Srv16 remote computer. The commands use the /s 
				parameter to specify the remote computer and the /u and
				/p parameters to run the commands with the permissions of 
				the user's Administrator account.
				iisftp /pause Updates /s 
				Srv16 /u Adminx /p p@$$werd
				iisftp /start Updates /s Srv16 /u Adminx /p p@$$werd
			 
			iisftp /setadprop
			
				This command sets Active Directory properties for a specific 
				user on a local or remote computer.
			
				 
			Syntax
			
				iisftp[.vbs] /setadpropUserID{FTPDir 
				| FTPRoot}PropertyID[/sComputer [/u 
				[Domain\]User [/pPassword]]]
			Parameters
			
				
					
						
							UserID
						
							Required. Specifies the logon ID of the Active 
							Directory user.
					 
					
						
							FTPDir|FTPRoot
						
							Required to set user isolation. Specifies isolation 
							at either directory or root level.
					 
					
						
							PropertyID
						
							Required to set user isolation. Specifies the value 
							of the directory or root isolation.
					 
					
						
							/sComputer
						
							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.
					 
					
						
							/pPassword
						
							Specifies the password of the user account specified 
							in the /u parameter. If you omit this 
							parameter, the script prompts you for the password 
							and obscures the text you type.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- To perform this procedure, you must be a member of the 
				Administrators group on the local computer, or you must have 
				been delegated the appropriate authority. If the computer is 
				joined to a domain, members of the Domain Admins group might be 
				able to perform this procedure. As a security best practice, 
				consider using Run as to perform this procedure. 
Examples
			
				
				The following example sets the Active Directory properties of 
				user MJones on a remote computer. 
				iisftp /SetADProp MJones FTPDir MikesDir /s Svr16 /u 
				Admin6 /p p@ssWor##
				Iisftp.vbs displays a "Connecting to server" message followed 
				by the Active Directory properties for MJones.
				
					
						
							
								
									
										
											
												
													
				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
													 
												 
											 
										 
									 
								 
							 
						 
					 
				 
				Server represents the computer name where drive D: is 
				found. Site Name is the name you assigned to the FTP 
				site. Metabase Path represents the metabase key assigned 
				by IIS. IP is unassigned by default. Port is set 
				to 21 by default. Root is the directory where the FTP 
				files reside. IsoMode is set to FTPDir. Status is 
				set to STARTED by default. 
			 
			iisftp /getadprop
			
				This command gets Active Directory properties for a specific 
				user on a local or remote computer.
			
				 
			Syntax
			
				iisftp[.vbs] /getadpropUserID[/sComputer 
				[/u [Domain\]User [/pPassword]]]
			Parameters
			
				
					
						
							UserID
						
							Required. Specifies the logon ID of the Active 
							Directory user.
					 
					
						
							/sComputer
						
							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.
					 
					
						
							/pPassword
						
							Specifies the password of the user account specified 
							in the /u parameter. If you omit this 
							parameter, the script prompts you for the password 
							and obscures the text you type.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- To perform this procedure, you must be a member of the 
				Administrators group on the local computer, or you must have 
				been delegated the appropriate authority. If the computer is 
				joined to a domain, members of the Domain Admins group might be 
				able to perform this procedure. As a security best practice, 
				consider using Run as to perform this procedure. 
Examples
			
				
				The following example returns the Active Directory properties of 
				user BSmith on the local computer. 
				iisftp /GetADProp BSmith
				Iisftp.vbs displays a "Connecting to server" message followed 
				by the Active Directory properties for BSmith.
				
					
						
							
								
									
										
											
												
													
				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
													 
												 
											 
										 
									 
								 
							 
						 
					 
				 
				Server represents the computer name where drive D: is 
				found. Site Name is the name you assigned to the FTP 
				site. Metabase Path represents the metabase key assigned 
				by IIS. IP is unassigned by default. Port is set 
				to 21 by default. Root is the directory where the FTP 
				files reside. IsoMode is set to FTPRoot. Status is 
				set to STARTED by default. 
			 
			iisftp /query
			
				This command displays the FTP sites on local and remote servers.
			
				 
			Syntax
			
				iisftp[.vbs] /query[FTPSite [FTPSite...]][/sComputer 
				[/u [Domain\]User [/pPassword]]]
			Parameters
			
				
					
						
							FTPSite
						
							Limits the query to the specified FTP sites. Type 
							the name or metabase path of the FTP sites. The 
							default is to display all FTP sites on the IIS 
							server. 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.
					 
					
						
							/sComputer
						
							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.
					 
					
						
							/pPassword
						
							Specifies the password of the user account specified 
							in the /u parameter. If you omit this 
							parameter, the script prompts you for the password 
							and obscures the text you type.
					 
					
						
							/?
						
							Displays help at the command prompt.
					 
				 
			 
			Remarks
			
				- The query output includes the site name, metabase 
				path, and the IP address or All to indicate all unassigned 
				addresses.
Examples
			
				The following examples show how to use iisftp /query in 
				specific situations. 
			To query the FTP sites on the local computer
			
				The following command displays the FTP sites on the local 
				computer:
iisftp /query
				In response, Iisftp.vbs displays all of the IIS FTP sites on 
				the local computer:
				
				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
				 
			To query a specific FTP site on a remote computer
			
				
				The following command searches for the Downloads FTP site on the 
				Srv01 remote computer. It uses the /s parameter to 
				specify the remote computer and the /u and /p 
				parameters to run the script with the permissions of the user's 
				Administrator account.
				iisftp /query Downloads /s Srv01 /u 
				Admin6 /p A76QVJ32#
				In response, Iisftp.vbs displays the Downloads FTP site on 
				Srv01:
				
					
						
							
				Connecting to server ...Done.
Site Name (Metabase Path)           Status    IP              Port
=======================================================
Downloads (MSFTPSVC/1879143292)     STARTED   ALL             21
							 
						 
					 
				 
			 
			To query multiple FTP sites
			
				
				The following command 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.vbs displays the Downloads and Drivers 
				FTP sites:
				
				Connecting to server ...Done.
Site Name (Metabase Path)           Status    IP              Port
======================================================================
Drivers (MSFTPSVC/1932955329)       STOPPED   ALL             21
Downloads (MSFTPSVC/1879143292)     STOPPED   171.16.1.120    21
				 
			 
			
				 
			
				 
			Remarks
			
				- To perform this procedure, you must be a member of the 
				Administrators group on the local computer, or you must have 
				been delegated the appropriate authority. If the computer is 
				joined to a domain, members of the Domain Admins group might be 
				able to perform this procedure. As a security best practice, 
				consider using Run as to perform this procedure. 
- Iisftp.vbs performs the same operations that are available 
				from IIS Manager. You can use either tool to administer IIS FTP 
				sites.
- The computer issuing the command must be running Windows XP 
				or a Windows Server 2003 operating system. The user must be a 
				member of the Administrators group on any computer that the 
				command affects.
- The computer that the command affects must be a server 
				running Windows Server 2003 with Internet Information Services 
				(IIS) 6.0.
- Iisftp.vbs displays a "Connecting to server" message while 
				it connects to the IIS service on the specified computer. This 
				message appears whenever you use Iisftp.vbs, whether on a local 
				or remote computer.
- Iisftp.vbs displays a "The system cannot find the path 
				specified" error message when it cannot find path to an FTP site 
				or when the FTP service is not installed.
Formatting legend
			
				
					
					
						| Italic | Information that the user must supply | 
					
						| Bold | Elements that the user must type exactly as shown | 
					
						| Ellipsis (...) | Parameter that can be repeated several times in a 
						command line | 
					
						| Between brackets ([]) | Optional items | 
					
						| Between braces ({}); choices separated by pipe (|). 
						Example: {even|odd} | Set of choices from which the user must choose only 
						one | 
					
						| Courier font | Code or program output | 
				
			 
			
			
			
 |  |