It is possible to publish an RDS RemoteApp installed on a Network Share. However, sometimes you got the error when you use GUI to publish an RDS RemoteApp that said you need to specify the correct UNC path for the application as the following picture.
We can resolve this issue by using a PowerShell command. In this post, I will show you how to resolve this issue.
Before we continue, we need to allow or make an exception for the following firewall rule on the server/computer where the application you want to publish installed:
- File and Printer Sharing (SMB-Out)
- File and Printer Sharing (SMB-In)
You can use the PowerShell command below to Publish an RDS RemoteApp
New-RDRemoteApp -Alias "App Name" -CollectionName "Collection" -DisplayName "APP DisplayName" -FilePath "\\server01\apps\app.exe"
-FilePath can also be a .cmd or .bat file, but then you also need to specify -IconPath as below:
New-RDRemoteApp -Alias "App Name" -CollectionName "Collection" -DisplayName "APP DisplayName" -FilePath "\\server01\apps\app.bat" -IconPath "c:\app1\app.exe"