I have a domain controller (DC) with windows server 2012 R2, from which I create remote apps via powershell on a gateway server (RD gateway - gateway.server.org (fictive name)) which has windows server 2016 and the remote desktop services installed like this.
The process of remote app creation is the following:
- Taking a list of users which are on a csv file and putting it in the DC.
- Reading the users list in the DC, targetting a local machine with an ip and making a remote app on the gateway server with these commands.
$argument = '192.168.144.'+$actualIp.ToString()+' '+ $loc_user+' '+ $loc_pw
New-RDRemoteApp -Alias $userName -DisplayName "${displayName}_${userName}" -FilePath C:\Windows\System32\connect.bat -IconPath C:\Windows\System32\icon.ico -UserGroups "$userName" -CommandLineSetting Require -RequiredCommandLine $argument -CollectionName "Remote Access" -ConnectionBroker gateway.server.org
Now this works usually fine for users to connect to their machine, but recently we are having more and more trouble connecting to the remote apps via the webpage of the gateway server. And sometimes it works sometimes not. We need to try 3 or 4 times or even restart the gateway server until it works.
The error users get by connecting is the following after a 5 minutes RD connection try.
Now what I also know is that those connection problems never happened before, and our sysadmin recently added the webclient package to be able to connect VIA the rdp ( Windows Users - gateway.server.org/RDWEB) and also via the website with HTML-5 (mac or linux users - gateway.server.org/RDWEB/webclient).
He used the following procedure where the following code is used to install the webclient package on the gateway server:
Install-Module -Name PowerShellGet -Force
Install-Module -Name RDWebClientManagement
Install-RDWebClientPackage
Import-RDWebClientBrokerCert <.cer file path>
Publish-RDWebClientPackage -Type Production -Latest
Since that moment we have RD apps loading problems. I am not 100% shure this is the cause.
Does anyone knows the reason this happens? Is there any known conflict between the normal remote desktop services on Windows Server 2016 and the webclient package? Shall we uninstall the RD desktop services to make it work. Or is there some other possible causes?
Any help would be highly appreciated.