I want to modify the IIS Web application Handler mappings permissions.
I did this manually like below.
Open IIS , Site/Web application, Clicked Handler Mappings, in Actions Clicked “Edit Feature Permissions “, then uncheck/Check the Script.
I want to automate this using PowerShell.
I can read the permission status using the below code.
Get-WebConfigurationProperty -Filter /system.webServer/handlers -name accesspolicy -PSPath IIS:\ -Location 'Default Web Site/WebApplication’
I tried same way to modify the permission using below code. But this is not working. Could anyone please let me know What I did wrong here.
Set-WebConfigurationProperty -Filter /system.webServer/handlers -name accesspolicy -value "Script" -PSPath IIS:\ -Location 'Default Web Site/WebApplication’ –Force