7

How can I change IIS "Feature Delegation" using Powershell. I want to change "Authentication - Anonymous" to read/write . I found this Toggle IIS 7.5 Authentication "Anonymous Authentication" with Powershell 3.0? , but not sure how to do something similar for "Feature Delegation". Thanks.

2 Answers 2

12

Finally found this link and it helped

http://forums.iis.net/t/1178408.aspx?PowerShell+command+Feature+Delegation+settings

Here are few examples.

Set-WebConfiguration //System.WebServer/Security/Authentication/anonymousAuthentication
-metadata overrideMode -value Allow -PSPath IIS:/

Set-WebConfiguration //System.WebServer/Security/Authentication/windowsAuthentication
-metadata overrideMode -value Deny -PSPath IIS:/
Sign up to request clarification or add additional context in comments.

Comments

1

In case you need the Get for this set above here is an example of that:

Get-WebConfiguration //System.WebServer/Security/Authentication/anonymousAuthentication -pspath iis:/ | select *

Function Enable-WindowsFeatureDelegation
{
    $delegateSet = (Get-WebConfiguration //System.WebServer/Security/Authentication/windowsAuthentication -pspath iis:/).Overridemode
    if($delegateSet -eq 'Deny')
    {
        Set-WebConfiguration //System.WebServer/Security/Authentication/windowsAuthentication -metadata overrideMode -value Allow -PSPath IIS:/
        Write-Output "Feature Delegation for windowsAuthentication has been set to Allow"
    }
}

Function Disable-WindowsFeatureDelegation
{
    $delegateSet = (Get-WebConfiguration //System.WebServer/Security/Authentication/windowsAuthentication -pspath iis:/).Overridemode
    if($delegateSet -eq 'Allow')
    {
        Set-WebConfiguration //System.WebServer/Security/Authentication/windowsAuthentication -metadata overrideMode -value Deny -PSPath IIS:/
        Write-Output "Feature Delegation for windowsAuthentication has been set to Deny"
    }
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.