When you deploy Remote Desktop Services to use the RemoteApp technology, you must then specify the address of your RemoteApp server on the various client PCs.
Although this is possible manually, it's also possible to do this with 2 group policies (GPO), as well as a PowerShell script (for Windows 7 only).
With these 2 group policies, you will be able to configure the access to RemoteApp applications for client PCs under Windows 7 or later.
Info : to use the RemoteApp technology on Windows Server 2012, check our tutorial : Windows Server 2012 / 2012 R2 - RDS - Publish RemoteApp programs (via the graphical interface)
To get started, go to your Active Directory server and run the program : Group Policy Management.
Then, right-click the "Default Domain Policy" item and click "Edit".
To automatically configure the access to RemoteApp resources from Windows 7 clients, you will need :
Contents of the file : Install-RADCConnection.ps1
PowerShell
<# .SYNOPSIS Installs a connection in RemoteApp and Desktop Connections. .DESCRIPTION This script uses a RemoteApp and Desktop Connections bootstrap file(a .wcx file) to set up a connection in Windows 7 workstation. No user interaction is required.It sets up a connection only for the current user. Always run the script in the user's session. The necessary credentials must be available either as domain credentials or as cached credentials on the local machine. (You can use Cmdkey.exe to cache the credentials.) Error status information is saved in event log: (Applications and Services\Microsoft\Windows\RemoteApp and Desktop Connections). .Parameter WCXPath Specifies the path to the .wcx file .Example PS C:\> Install-RADCConnection.ps1 c:\test1\work_apps.wcx Installs the connection in RemoteApp and Desktop Connections using information in the specified .wcx file. #> Param( [parameter(Mandatory=$true,Position=0)] [string] $WCXPath ) function CheckForConnection { Param ( [parameter(Mandatory=$true,Position=0)] [string] $URL ) [string] $connectionKey = "" [bool] $found = $false foreach ($connectionKey in get-item 'HKCU:\Software\Microsoft\Workspaces\Feeds\*' 2> $null) { if ( ($connectionKey | Get-ItemProperty -Name URL).URL -eq $URL) { $found = $true break } } return $found } # Process the bootstrap file [string] $wcxExpanded = [System.Environment]::ExpandEnvironmentVariables($WCXPath) [object[]] $wcxPathResults = @(Get-Item $wcxExpanded 2> $null) if ($wcxPathResults.Count -eq 0) { Write-Host @" The .wcx file could not be found. "@ exit(1) } if ($wcxPathResults.Count -gt 1) { Write-Host @" Please specify a single .wcx file. "@ exit(1) } [string] $wcxFile = $wcxPathResults[0].FullName [xml] $wcxXml = [string]::Join("", (Get-Content -LiteralPath $wcxFile)) [string] $connectionUrl = $wcxXml.workspace.defaultFeed.url if (-not $connectionUrl) { Write-Host @" The .wcx file is not valid. "@ exit(1) } if ((CheckForConnection $connectionUrl)) { Write-Host @" The connection in RemoteApp and Desktop Connections already exists. "@ exit(1) } Start-Process -FilePath rundll32.exe -ArgumentList 'tsworkspace,WorkspaceSilentSetup',$wcxFile -NoNewWindow -Wait # check for the Connection in the registry if ((CheckForConnection $connectionUrl)) { Write-Host @" Connection setup succeeded. "@ } else { Write-Host @" Connection setup failed. Consult the event log for failure information: (Applications and Services\Microsoft\Windows\RemoteApp and Desktop Connections). "@ exit(1) }
Contents of the file : feed.wcx
Note : don't forget to change the "rds.informatiweb.lan" value of the code below by the name of your RemoteApp server (or by the name of the broker if you use multiple servers for RemoteApp).
XML
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <workspace name="Workspace Resources" xmlns="http://schemas.microsoft.com/ts/2008/09/tswcx" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <defaultFeed url="https://rds.informatiweb.lan/RDWeb/Feed/webfeed.aspx" /> </workspace>
Once you have created these 2 files, go to : User Configuration -> Policies -> Windows Settings -> Scripts (Logon/Logoff).
Then, double-click on : Login.
Go to the "PowerShell Scripts" tab and click "Add".
Click : Browse.
By default, you will be in a "Logon" folder.
Copy the Install-RADCConnection.ps1 and feed.wcx files to this folder, and then select the file : Install-RADCConnection.ps1
The script's name appears.
Add "feed.wcx" as the script parameter and click OK.
Now, the RemoteApp configuration on Windows 7 clients will be performed automatically when a user of the Active Directory logs on.
For Windows 8, 8.1, and Windows 10, go to : User Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> RemoteAppe and Desktop Connections.
Then, double-click on the line : Specify default connection URL.
Choose "Enabled" and specify the URL of your RemoteApp server.
Note : this is the same URL that is in the feed.wcx file used for automatic configuration of Windows 7 clients.
The url is similar to this : https://rds.informatiweb.lan/RDWeb/Feed/webfeed.aspx
Now, Windows 8, 8.1, and 10 (and later) clients will automatically be configured when a user of the Active Directory logons.
Run the "gpupdate" program on your Active Directory server, and then disconnect from that server and connect again.
Now, client PCs will automatically have access to RemoteApp applications.
On one of your Windows 7 client PCs that are linked to your Active Directory, log on with a user of your Active Directory.
Then, go to the Control Panel and select : View by Small icons.
Click on : RemoteApp and Desktop Connections.
Access to desktops and programs of your workspace (RemoteApp) is already configured.
In the Start menu, you will also find shortcuts for RemoteApp applications to which this user of the Active Directory accesses.
Windows Server 6/7/2019
Windows Server 3/8/2019
Windows Server 4/28/2019
Windows Server 3/16/2019
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
You must be logged in to post a comment