[英]Powershell - Unable to disable Anonymous Authentication in IIS for a website
[英]Unable to set Forms authentication to 'Enabled' for a web application under website in IIS through powershell
我正在嘗試為 IIS 中網站下的 Web 應用程序啟用表單身份驗證。 以下是我用於相同的代碼。
代碼:
Write-Host "Setting App Form AuthMode for $($IISApp) to True"
Set-WebConfiguration -filter "system.web/authentication" -pspath
$IISApp -value @{mode='forms'}
輸出:
Setting App Form AuthMode for IIS:\Sites\MySite\MyApp to True
無論我嘗試什么,我都無法為 Web 應用程序啟用表單模式。
請試試這個:
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/Default Web Site' -filter "system.web/authentication" -name "mode" -value "Forms"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.