Set-WebHandler

Configures an IIS request handler.

Syntax

Set-WebHandler
   [-Name] <String>
   [-Path <String>]
   [-Verb <String>]
   [-Type <String>]
   [-Modules <String>]
   [-ScriptProcessor <String>]
   [-Precondition <String>]
   [-ResourceType <String>]
   [-RequiredAccess <String>]
   [-Location <String[]>]
   [[-PSPath] <String[]>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Configures an IIS request handler.

Examples

-------------- EXAMPLE 1: Change a property of a handler --------------

IIS:\>Set-WebHandler -Name StaticFile -Path "*.htm"

Sets properties of a handler.

Required Parameters

-Name

The name of the handler to configure.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Location in which to set this configuration.

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Modules

Modules needed for the handler (native handlers only).

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PSPath

An IIS configuration path to the location in which the module is configured.

Type:String[]
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Path

The physical path to the handler (native modules only).

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Precondition

Preconditions for the new handler.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RequiredAccess

Access user rights required for the module (Script, Read, Write, Execute).

Type:String
Parameter Sets:None, Read, Write, Script, Execute
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceType

Resource type required for the handler.

Type:String
Parameter Sets:File, Directory, Either, Unspecified
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ScriptProcessor

Script processor to execute for the handler (native handlers only).

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Type

Managed Type of the handler (managed handlers only).

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Verb

HTTP Verbs for which the handler is executed.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False