【发布时间】:2015-11-30 03:25:03
【问题描述】:
我正在尝试使用 PowerShell 在 IIS 站点上为自签名/本地证书设置 SSL 证书。
我创建证书:
$newCert =
New-SelfSignedCertificate
-DnsName www.mywebsite.ru
-CertStoreLocation cert:\LocalMachine\My
然后尝试设置 SSL 绑定:
get-item
cert:\LocalMachine\MY\$newCert.Thumbprint |
new-item -path IIS:\SslBindings\0.0.0.0!443
这里也显示: Powershell IIS7 Snap in Assign SSL certificate to https binding
我也试过了:
get-item
cert:\LocalMachine\MY\$newCert.Thumbprint |
new-item -path IIS:\SslBindings\*!443
无济于事,我没有在“编辑站点绑定”对话框中看到 SSL 证书设置。
有什么想法吗?
【问题讨论】:
-
使用
IIS:\SslBindings\0.0.0.0!443而不是IIS:\SslBindings\*!443。当您将站点绑定到此端口时,它将使用已注册的证书。
标签: powershell iis ssl certificate