編輯

共用方式為


Remove-WebHandler

Removes a request handler from IIS.

Syntax

Remove-WebHandler
      [-Name] <String>
      [-Location <String[]>]
      [[-PSPath] <String[]>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-WebHandler cmdlet removes a request handler from Internet Information Services (IIS).

Examples

Example 1: Remove a handler

IIS:\> Remove-WebHandler -Name "TestHandler" -PSPath "IIS:\sites\Default Web Site"

This command removes the request handler named TestHandler from the default website.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Specifies the configuration location from which the handler is removed.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

Specifies the name of the handler to remove.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PSPath

Specifies an IIS configuration path to the location.

Type:String[]
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False