Created
April 19, 2023 03:04
-
-
Save karoltheguy/a33e5c7e7771c2a0946d2d378c3e60d6 to your computer and use it in GitHub Desktop.
Set Certificate for RDP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Certificate has to be installed in Personal | |
#Subject is who it has been issued to | |
$certSubject = "" | |
$tp = (ls Cert:\LocalMachine\my | WHERE {$_.Subject -match $certSubject } | Select -First 1).Thumbprint | |
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="$tp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment