My IIS looks like this:
Sites -> Default Web Site -> MyWebApp
Then the question arises: how to enable authentication on MyWebApp? I can change or change Anonymous access, Basic and Windows Auth. However, Forms Auth is not so simple. How to do it in Powershell?
I can read the setup like this:
(Get-WebConfiguration system.web/authentication 'IIS:\sites\Default Web Site\MyWebApp').Mode
I am having problems or not luck in Set-Webconfiguration or Set-Webconfigurationproperty. I find these cmdlets difficult to understand.
Changes occur in web.config, at least updating web.config, when I click "Enable" or "Disable" in "Form Authentication" in IIS Manager. Any hints and tips are highly appreciated.
Piguy source share