I have the following PS code that gets the Remote desktop certificate "thumbprint":
$cert = Get-ChildItem -Path 'Cert:\LocalMachine\Remote Desktop'
$hostname = hostname
$thumbprint = $cert.Thumbprint
where $thumbprint is String value, like this : AABBCC...DD (40 caracters)
And i want to add it to the following key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Terminal Server Client\Servers
where $hostname, should be the key, and the binary value which CertHash should be Binary value and must contain $thumbprint (this should be create on other computers)
Could you please tell me how the second part of the script should be, since the thumbprint is stored in a text file on a file server, and the remote computer runs the second part, to add it as CertHash value?
Thanks in advance,