gpt4 book ai didi

powershell - 使用 PowerShell 将 SSL 证书绑定(bind)到端口

转载 作者:行者123 更新时间:2023-12-02 23:23:26 49 4
gpt4 key购买 nike

 $Thumbprint = (Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Subject -match "CN=appserver.domain.com"}).Thumbprint;

$guid = [guid]::NewGuid()
$certHash = $thumbprint
$ip = "0.0.0.0" # This means all IP addresses
$port = "8280" # the default HTTPS port

"http add sslcert ipport=$($ip):$port certhash=$Thumbprint appid={$guid}" | netsh

我是从网上搜索到的,但是没有用。运行时不会创建该条目。我正在使用 netsh http show sslcert 检查,但什么也没有。

最佳答案

如果你有 PowerShell 4.0+,你可以使用 Add-NetIPHttpsCertBinding

文档 + 示例 https://technet.microsoft.com/itpro/powershell/windows/networktransition/add-netiphttpscertbinding

关于powershell - 使用 PowerShell 将 SSL 证书绑定(bind)到端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43111782/

49 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com