New-Web
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.
Required Parameters
Specifies the name of the new request handler.
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the physical path to the handler. This parameter applies to native modules only.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the HTTP verbs that are handled by the new handler.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Optional Parameters
Forces the creation of the new handler.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the configuration location in which the handler is configured.
Type: | String[] |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the modules used for the handler.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies an IIS configuration path.
Type: | String[] |
Position: | 1 |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies preconditions for the new handler.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
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: | None, Read, Write, Script, Execute |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the resource type this handler runs.
Type: | String |
Parameter Sets: | File, Directory, Either, Unspecified |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the script processor that runs for the module.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |
Specifies the managed type of the new module. This parameter applies to managed modules only.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByPropertyName) |
Accept wildcard characters: | False |