Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

New-WebHandler

Last Updated: 4/3/2017

SYNOPSIS

Creates an 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

The New-WebHandler cmdlet creates an Internet Information Services (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"

This command adds a handler named TestHandler to the default website.

PARAMETERS

-Force

Forces the creation of the new handler.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Location

Specifies the configuration location in which the handler is configured.

Type: String[]
Parameter Sets: (All)
Aliases: 

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

-Modules

Specifies the modules used for the handler.

Type: String
Parameter Sets: (All)
Aliases: 

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

-Name

Specifies the name of the new request handler.

Type: String
Parameter Sets: (All)
Aliases: 

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

-PSPath

Specifies an IIS configuration path.

Type: String[]
Parameter Sets: (All)
Aliases: 

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Path

Specifies the physical path to the handler. This parameter applies to native modules only.

Type: String
Parameter Sets: (All)
Aliases: 

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

-Precondition

Specifies preconditions for the new handler.

Type: String
Parameter Sets: (All)
Aliases: 

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

-RequiredAccess

Specifies the user rights that are required for the new handler. The acceptable values for this parameter are:

  • Read
  • Write
  • Execute
  • Script
Type: String
Parameter Sets: (All)
Aliases: 
Accepted values: None, Read, Write, Script, Execute

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

-ResourceType

Specifies the resource type this handler runs.

Type: String
Parameter Sets: (All)
Aliases: 
Accepted values: File, Directory, Either, Unspecified

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

-ScriptProcessor

Specifies the script processor that runs for the module.

Type: String
Parameter Sets: (All)
Aliases: 

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

-Type

Specifies the managed type of the new module. This parameter applies to managed modules only.

Type: String
Parameter Sets: (All)
Aliases: 

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

-Verb

Specifies the HTTP verbs that are handled by the new handler.

Type: String
Parameter Sets: (All)
Aliases: 

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Get-WebHandler

Remove-WebHandler

Set-WebHandler

© 2017 Microsoft