Skip to content

WebApplicationHandler

dscbot edited this page Jul 31, 2025 · 4 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
Name Key String Specifies the name of the new request handler.
Path Required StringArray[] Specifies an IIS configuration path.
AllowPathInfo Write Boolean Specifies whether the handler processes full path information in a URI, such as contoso/marketing/imageGallery.aspx. If the value is true, the handler processes the full path, contoso/marketing/imageGallery. If the value is false, the handler processes only the last section of the path, /imageGallery.
Ensure Write String Indicates if the application handler exists. Set this property to Absent to ensure that the application handler does not exist. Default value is 'Present'. Present, Absent
Location Write String Specifies The location of the configuration setting. Location tags are frequently used for configuration settings that must be set more precisely than per application or per virtual directory.
Modules Write String Specifies the modules used for the handler.
physicalHandlerPath Write String Specifies the physical path to the handler. This parameter applies to native modules only.
PreCondition Write String Specifies preconditions for the new handler.
RequireAccess Write String Specifies the user rights that are required for the new handler. None, Read, Write, Script, Execute
ResourceType Write String Specifies the resource type this handler runs.
ResponseBufferLimit Write UInt32 Specifies the maximum size, in bytes, of the response buffer for a request handler runs.
ScriptProcessor Write String Specifies the script processor that runs for the module.
Type Write String Specifies the managed type of the new module. This parameter applies to managed modules only.
Verb Write String Specifies the HTTP verbs that are handled by the new handler.

Description

The WebApplicationHandler DSC resource is used to ...

Requirements

  • Target machine must be running Windows Server 2012 R2 or later.

Known issues

All issues are not listed here, see here for all open issues.

Examples

Example 1

Configuration Example
{
    Import-DscResource -ModuleName WebAdministrationDsc

    Node 'localhost'
    {

        WebApplicationHandler  WebHandlerTest
        {
            Path                 = 'MACHINE/WEBROOT/APPHOST'
            Name                 = 'ATest-WebHandler'
            PhysicalHandlerPath  = '*'
            Verb                 = '*'
            Modules              = 'IsapiModule'
            RequireAccess        = 'None'
            ScriptProcessor      = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"
            ResourceType         = 'Unspecified'
            AllowPathInfo        = $false
            ResponseBufferLimit  = 0
            Type                 = $null
            PreCondition         = $null
            Location             = 'Default Web Site/TestDir'
        }
    }
}

Clone this wiki locally