2017-08-01 39 views
1

我對Windows PowerShell完全陌生。 我試圖改變IIS的默認網站的SSL設置從 Required SSL = false and client certificate = ignoreRequired SSL = true and client certificate = accept使用PowerShell(我必須配置它到劇本) 我已經搜索,但沒有得到任何解決方案。使用powershell更改IIS SSL設置

enter image description here

請幫忙。任何線索或解決方案將不勝感激。 :) 謝謝

回答

5

使用Set-WebConfiguration cmdlet。有一個偉大的configuration reference on IIS.NET,你可以用它來找到有效的值 - 在這種情況下SslSslNegotiateCert

Set-WebConfiguration -Location "[sitename]" -Filter 'system.webserver/security/access' -Value 'Ssl,SslNegotiateCert' 
+0

感謝。該鏈接是一個很大的幫助。這裏是什麼「[sitename]」?我應該從哪個位置運行PowerShell? –

+0

代替[sitename],您應該將網站或路徑的名稱放在您要設置的應用程序或虛擬目錄中。在服務器上作爲本地管理員或作爲已被委派權限來管理相關網站/ app/vdir的用戶應該執行 –

+0

感謝隊友。有效 –