Ich habe Power Shell-Skript, die IIS Web/Pool erstellen.By Standard-Website ist Form Auth ich möchte es auf Windows-Auth von PS-Skript wechseln.Found, wie man das aber form auth dont disable und meine form und win auth sind aktiviert und das ist ein problem.Wie form auth zu deaktivieren, damit ich nur windows auth haben kann?PowerShell-Skript, die zwischen Foms-Authentifizierung und Windows-Authentifizierung wechseln IIS
Antwort
i fix it Fenster und deaktivieren Formen ermöglichen Auth $ config = (Get-WebConfiguration system.web/Authentifizierung "IIS: \ sites \ $ iisAppName") $ config.mode = "Windows" $ config | Set-WebConfiguration system.web/Authentifizierung Set-WebConfigurationProperty -filter /system.webServer/security/authentication/windowsAuthentication -name aktiviert -Wertes wahr -PSPath IIS: \ -location $ iisAppName/$ iisAppPoolName
zu deaktivieren Fenster und Formulare aktivieren $ config = (Get-WebConfiguration system.web/Authentifizierung "IIS: \ sites \ $ iisAppName") $ config.mode = "Formulare" $ config | Set-WebConfiguration system.web/Authentifizierung
$ WinAuth = Get-WebConfiguration -filter /system.webServer/security/authentication/windowsAuthentication $ winAuth.enabled = $ false $ WinAuth | set-Webkonfiguration -filter /system.webServer/security/authentication/windowsAuthentication -PSPath IIS: \ -location "$ iisAppName"