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'!将站点绑定到此端口时,它将使用注册的证书。 –