Change Remote Desktop certificate in Windows Server 2012R2

To change Remote Desktop certificate in Windows Server 2012R2 you need to do two steps:

Step 1. Get thumbprint of certificate (the name of certificate must be equal of server connection name). It possible from mmc.exe console (add certificates snap-in from computer account and view certificate in personal folder). Copy thumbprint without spaces and special symbol in start of line.

Step 2. Assign certificate from powershell:

$path = (Get-WmiObject -class “Win32_TSGeneralSetting” -Namespace rootcimv2terminalservices -Filter “TerminalName=’RDP-tcp'”).__path
Set-WmiInstance -Path $path -argument @{SSLCertificateSHA1Hash=”THUMBPRINT”} ## in THUMBPRINT pole add value from step 1.

 

 636 total views

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.