【问题标题】:How to remove SSL bindings using powershell如何使用 powershell 删除 SSL 绑定
【发布时间】:2011-05-12 11:16:36
【问题描述】:

我使用Remove-WebBinding -Port $Port -Protocol https 删除网络绑定。这会从关联站点中删除绑定,但绑定仍然存在,我可以在 IIS:\SslBindings 下找到一个条目,但未分配给任何站点

如果我尝试分配这些未使用的绑定中的任何一个,我会收到错误 端点 0.0.0.0:38000 的 SSL 绑定已经存在。

问题是我应该使用哪个 cmdlet 来删除绑定或从 IIS:\SslBinding 中删除条目?

问候, 天哪

【问题讨论】:

    标签: iis powershell


    【解决方案1】:

    使用Remove-Item 怎么样:

    例子:

    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
    

    【讨论】:

    • 感谢 JPBlanc,这可以完成这项工作,但是在 WebAdministration 模块中定义的任何 cmdlet 可以执行此操作吗?
    【解决方案2】:

    当然有一个 WebAdministration cmdlet:Remove-WebBinding
    http://technet.microsoft.com/en-us/library/ee790591.aspx

    【讨论】:

    • 我不明白为什么这个答案存在,或者为什么有人赞成它。在问题中,海报说他们正在使用 Remove-WebBinding。
    【解决方案3】:

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

    $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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-24
      • 2021-03-29
      • 2020-09-07
      • 2013-10-07
      • 1970-01-01
      • 2013-08-11
      • 2013-08-17
      • 2018-10-13
      相关资源
      最近更新 更多