Monday, November 11, 2019

给 RDP 安装证书

准备工作:

1. 安装 Root CA
2. 安装 Intermediate CA
3. IIS 安装签发好的证书

方法一: (PowerShell)
Open a PowerShell console (Runas administrator) on your RD Session Host. Type/paste the commands below:

This command displays the thumbprint of the certificate, copy it to a text file or something similar:
Get-ChildItem "Cert:\LocalMachine\My"
This is a variable to set the WMI path to the RD Session Host RDP listener (Where the certificate needs to be changed):
$PATH = (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices)
Finally this is the command to change the active certificate on the RDP listener:
Set-WmiInstance -Path $PATH -argument @{SSLCertificateSHA1Hash="thumbprint"}
The "thumbprint" above, is the value you noted earlier, just insert it between the ".

参考:
https://social.technet.microsoft.com/Forums/en-US/bcedb97f-b86f-485a-a39f-579f947cf367/how-install-ssl-certificate-for-rds-on-windows-server-2016?forum=winserverTS

https://serverfault.com/questions/444286/configure-custom-ssl-certificate-for-rdp-on-windows-server-2012-and-later-in-r


方法二:
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="thumbprint"
参考:
 https://blog.brankovucinec.com/2016/12/06/how-to-install-custom-certificate-on-rdsh-server/

No comments:

Post a Comment

华为交换机option43和60实例

AC: Aruba 651- 10.77.25.1 AP: Aruba 105 - 172.17.2.0/24 SW: 华为S5720  ip pool pool2  gateway-list 172.17.2.1  network 172.17.2.0 mask 255.255...