I'd like to toggle the Anonymous Authentication (Enabled/Disabled) setting found in IIS Manager (7.5, Windows 7), Default Web Site / My Website - Authentication / Anonymous Authentication using Powershell.
I'm not looking for something that alters a web.config file, but does exactly what IIS Manager does.
I've tried Set-WebConfiguration and Set-WebConfigurationProperty but not gotten close.
Can anyone provide an example?
Try the Set-WebConfigurationProperty cmdlet:
Set-WebConfigurationProperty -Filter system.webServer/security/authentication/anonymousAuthentication `
-PSPath MACHINE/WEBROOT/APPHOST `
-Location 'Default Web Site' `
-Name Enabled `
-Value $true
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