开发者

How to remove SSL bindings using powershell

I use Remove-WebBinding -Port $Port -Protocol https to remove a web binding. This removes the binding from the associated site but the binding continues 开发者_高级运维to exist and I can find an entry under IIS:\SslBindings but not assigned to any site

If i try to assign any of these unused binding i get the error SSL binding for end point 0.0.0.0:38000 already exists.

question is which cmdlet should I use to delete the binding or to remove the entry from IIS:\SslBinding ?

Regards, Jeez


What about using Remove-Item :

Example :

PS> dir IIS:\SslBindings

IP Address       Port Store            Sites
----------       ---- -----            -----
0.0.0.0          8172 MY
0.0.0.0          9000 My

PS> Remove-Item -path "IIS:\SslBindings\0.0.0.0!9000"
PS> dir IIS:\SslBindings

IP Address       Port Store            Sites
----------       ---- -----            -----
0.0.0.0          8172 MY


Of course there is a WebAdministration cmdlet : Remove-WebBinding
http://technet.microsoft.com/en-us/library/ee790591.aspx


Use netsh http delete sslcert ipport=0.0.0.0:443 to delete a SSL certificate binding: example:

$DelSsl = netsh http delete sslcert ipport=0.0.0.0:443
$DelSsl 
$Ssl = netsh http add sslcert ipport=0.0.0.0:443 certhash=$certhash appid=$appid
$Ssl
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜