다음을 통해 공유


Removing Web Service Extension Files Using Iisext.vbs

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

You can use the command-line script iisext.vbs, which is stored in systemroot\system32, to remove a single deleteable file from the WebSvcExtRestrictionList Metabase Property. The command can be executed on local or remote computers running a member of the Windows Server 2003 family with IIS 6.0. Web service extension files can be either ISAPI extensions or CGI files.

Iisext.vbs performs the same operations that are available in IIS Manager. You can use either tool to administer IIS Web sites.

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 must 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

iisext /RmFile Drive:\Path\FileName [/s Computer [/u [Domain\]User [/p Password]]]

Parameters

Drive\Path\FileName

Required. Specifies the file name and the path of the Web service extension file that is going to be removed from the Web service extension restriction list (WebSvcExtRestrictionList).

Note

If the file has been flagged as undeletable, iisext returns the error message, "Error trying to delete extension. Make sure it exists and is deletable."

/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. If you omit this parameter, the script prompts you for the password and obscures the text you type.

Examples

Example 1:

The following command removes the file "Accounting.dll" from the WebSvcExtRestrictionList property of the metabase on the local computer:

iisext /RmFile c:\Source\Accounting.dll

In response, iisext displays the following:

Connecting to server ...Done.

Removing extension file complete.

Example 2:

The following command removes the file "Taxes.exe" from the WebSvcExtRestrictionList property of the metabase on a remote computer:

iisext /RmFile c:\Source\Taxes.exe /s RemoteComputer /u Manager /p Pa$$Werd

In response, iisext displays the following:

Connecting to server ...Done.

Removing extension file complete.