How to Import certificate for RDS

How to Import certificate for RDS

326
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 15:56 PM


Symptom


How to import Certificate to the RDP via PowerShell



Environment


11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.4;12.3;12.5;12.6;14.0;14.5;14.6 Privileged Access Manager (PAM, self-hosted) PSM PSM PSM Connection via PVWA

Cause


A certificate is missing in the RDS



Resolution


From an elevated Powershell ISE window please run the following commands to validate the certificate thumbprint and import the cert for RDS.

 

1: Verify thumbprint of the new cert:

Get-ChildItem "Cert:\LocalMachine\My"

 

2: Set the $PATH variable for use in the next command:

$PATH = (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices)

 

3: Replace "thumbprint" below with the actual thumbprint, you need to copy from the output of the first command IN PowerShell to properly avoid issues:

Set-WmiInstance -Path $PATH -argument @{SSLCertificateSHA1Hash="thumbprint"} 

 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj00000012MMCAY&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail