New-WebHandler

Creates a new IIS request handler.

Syntax

New-WebHandler
   [-Name] <String>
   -Path <String>
   -Verb <String>
   [-Type <String>]
   [-Modules <String>]
   [-ScriptProcessor <String>]
   [-Precondition <String>]
   [-ResourceType <String>]
   [-RequiredAccess <String>]
   [-Force]
   [-Location <String[]>]
   [[-PSPath] <String[]>]
   [<CommonParameters>]

Description

Creates a new IIS request handler.

Examples

-------------- EXAMPLE 1: Add a new handler --------------

IIS:\>New-WebHandler -Name testHandler -Path *.test -Verb 'GET,POST' -Modules IsapiModule -PSPath "IIS:\sites\Default Web Site"

Adds a handler named "testHandler" to the Default Web Site.

Required Parameters

-Name

The name of the new request handler.

Type:String
Position:0
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
-Verb

The HTTP verbs handled by the new handler.

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

Optional Parameters

-Force

Forces creation of the new handler.

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

Configuration location in which the handler is configured.

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

Modules used for the handler.

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

An IIS configuration path.

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

Specifies any preconditions that are used for the new handler.

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

The user rights that are required for the new handler: Read, Write, Execute, or Script.

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

The resource type this handler executes.

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

The script processor that executes for the module.

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

The managed type of the new module (managed modules only).

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