12
我想使用PowerShell在IIS站點上設置自簽名/本地證書的SSL證書。Powershell - 在https綁定上設置SSL證書
我創建證書:
$newCert =
New-SelfSignedCertificate
-DnsName www.mywebsite.ru
-CertStoreLocation cert:\LocalMachine\My
這裏也顯示: Powershell IIS7 Snap in Assign SSL certificate to https binding
get-item
cert:\LocalMachine\MY\$newCert.Thumbprint |
new-item -path IIS:\SslBindings\0.0.0.0!443
對這個職位如圖所示
我也試過了:
get-item
cert:\LocalMachine\MY\$newCert.Thumbprint |
new-item -path IIS:\SslBindings\*!443
無濟於事,我沒有看到編輯網站綁定對話框中設置的SSL證書。
有什麼想法?
使用'IIS:\ 443'的SslBindings \ 0.0.0.0代替'IIS :\ SslBindings \ * 443'!將站點綁定到此端口時,它將使用註冊的證書。 –