使用Powershell在IIS上安裝SSL憑証
使用Powershell在IIS上安裝SSL憑証
$securePfxPass = "你的密碼" | ConvertTo-SecureString -AsPlainText -Force
Import-PfxCertificate -Password $securePfxPass -CertStoreLocation Cert:\LocalMachine\My -FilePath c:\test.local.pfx
$pfxThumbprint = (Get-PfxData -FilePath \test.local.pfx -Password $securePfxPass).EndEntityCertificates.Thumbprint
$binding = New-WebBinding -Name "Default Web Site" -Protocol https -IPAddress * -Port 443;
$binding = Get-WebBinding -Name "Default Web Site" -Protocol https;
$binding.AddSslCertificate($pfxThumbprint, "my");
沒有留言:
張貼留言