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.
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:/
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"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With