Remote Desktop Web Client Import Existing Certificate

Copper Contributor

I am working through the process to setup the Remote Desktop Web Client as documented here, which all works fine when manually working through these steps:

 

https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-deskto...

 

I am also working to automate this process with some server deployments, which I can mostly do up to the step to import the certificate, which is this command:

 

Import-RDWebClientBrokerCert <.cer file path>

 

However, we already have a certificate seeded and setup on the certificate store on the server that I want to use, but this command provides no way to reference or use said certificate by thumbprint. Is there any other possible way to reference and use a certificate that is already on the server? I found I can't run the last command to publish until I do the certificate import:

 

Publish-RDWebClientPackage -Type Production -Latest

 

The certificate I have in place is one that I'm already using on the same server for the connection broker and session host roles. I did see further down some netsh commands regarding setting the certificate, but this doesn't really do anything as the port already has the certificate and it doesn't seem to matter for whatever is required to run the publish command. Is there any way to do this without importing a real certificate file?

2 Replies

@ESpigle The powershell command to import and publish is pretty complex, you might be able to reverse engeneer what they do and make the same changes. But another simple workaround would be to export the certificate to file and then import it again with the import command.

/Mr T-Bone

@MrTbone_seI will look into going the route of exporting and re-importing the same certificate from the certificate store for this purpose and hope that maybe in the future that this command will allow for referencing an existing thumbnail on the system and not just pulling in a certificate file.