Skip to content

Instantly share code, notes, and snippets.

@karoltheguy
Created April 19, 2023 03:04
Show Gist options
  • Save karoltheguy/a33e5c7e7771c2a0946d2d378c3e60d6 to your computer and use it in GitHub Desktop.
Save karoltheguy/a33e5c7e7771c2a0946d2d378c3e60d6 to your computer and use it in GitHub Desktop.
Set Certificate for RDP
#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