准备工作:
1. 安装 Root CA
2. 安装 Intermediate CA1. 安装 Root 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