Windows Server 2019 Webclient, cannot install certificate anymore

%3CLINGO-SUB%20id%3D%22lingo-sub-2109880%22%20slang%3D%22en-US%22%3EWindows%20Server%202019%20Webclient%2C%20cannot%20install%20certificate%20anymore%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2109880%22%20slang%3D%22en-US%22%3E%3CP%3EI%20try%20to%20set%20up%20the%20webclient%20like%20described%20in%26nbsp%3B%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-server%2Fremote%2Fremote-desktop-services%2Fclients%2Fremote-desktop-web-client-admin%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ESet%20up%20the%20Remote%20Desktop%20web%20client%20for%20your%20users%20%7C%20Microsoft%20Docs%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EWhen%20running%20the%20command%26nbsp%3B%3CSPAN%3EImport-RDWebClientBrokerCert%2C%20it%20fails%20with%20the%20following%20error%3A%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3EPS%20C%3A%5C%26gt%3B%20Import-RDWebClientBrokerCert%20.%5Cdemo.cer%0ANew-Object%20%3A%20Exception%20calling%20%22.ctor%22%20with%20%221%22%20argument(s)%3A%20%22The%20system%20cannot%20find%20the%20file%20specified.%0A%22%0AAt%20C%3A%5CProgram%20Files%5CWindowsPowerShell%5CModules%5CRDWebClientManagement%5C1.0.3%5CRDWebClientManagement.psm1%3A1116%20char%3A13%0A%2B%20%20%20%20%20%24cert%20%3D%20New-Object%20System.Security.Cryptography.X509Certificates.%20...%0A%2B%20%20%20%20%20%20%20%20%20%20%20%20%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%0A%20%20%20%20%2B%20CategoryInfo%20%20%20%20%20%20%20%20%20%20%3A%20InvalidOperation%3A%20(%3A)%20%5BNew-Object%5D%2C%20MethodInvocationException%0A%20%20%20%20%2B%20FullyQualifiedErrorId%20%3A%20ConstructorInvokedThrowException%2CMicrosoft.PowerShell.Commands.NewObjectCommand%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20all%20worked%20before%2C%20I%20had%20it%20all%20up%20and%20running%20for%20a%20year%2C%20I%20just%20had%20to%20install%20a%20new%20certificate.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20even%20tried%20in%20on%20a%20completely%20new%20and%20fresh%20Server%202019%20which%20I%20set%20up%20as%20a%20RDS%20Gateway%20server.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20not%20found%20anything%20pointing%20me%20in%20the%20right%20direction.%20Any%20hints%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I try to set up the webclient like described in 
Set up the Remote Desktop web client for your users | Microsoft Docs

When running the command Import-RDWebClientBrokerCert, it fails with the following error:

PS C:\> Import-RDWebClientBrokerCert .\demo.cer
New-Object : Exception calling ".ctor" with "1" argument(s): "The system cannot find the file specified.
"
At C:\Program Files\WindowsPowerShell\Modules\RDWebClientManagement\1.0.3\RDWebClientManagement.psm1:1116 char:13
+     $cert = New-Object System.Security.Cryptography.X509Certificates. ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [New-Object], MethodInvocationException
    + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

 

This all worked before, I had it all up and running for a year, I just had to install a new certificate.

I even tried in on a completely new and fresh Server 2019 which I set up as a RDS Gateway server.

 

I have not found anything pointing me in the right direction. Any hints?

 

0 Replies