Step by Step Windows 2012 R2 Remote Desktop Services – Part 4


A step by step guide to build a Windows 2012 R2 Remote Desktop Services deployment.

Part 4 – Publishing RemoteApp programs.

If you missed the previous parts:
Step by Step Windows 2012 R2 Remote Desktop Services – Part 3: Adding Session Hosts and Load Balancing session collections
Step by Step Windows 2012 R2 Remote Desktop Services – Part 2: Deploying an advanced setup
Step by Step Windows 2012 R2 Remote Desktop Services – Part 1: Deploying a single server solution

I’ll be using the setup I demonstrated in Part 2 – Deploying an advanced setup because this setup was still on my Windows 8.1 Hyper-V setup. As a reminder, here’s the setup again:
RDS Deployment - RemoteApps 01

Everything is up & running, so this guide won’t be focusing on building the Remote Desktop Services deployment itself.

 

Perparing for publishing a RemoteApps collection
By the end of Step 2 in this series I had a Full Desktop session collection fully functioning. To prepare the lab for RemoteApps I can simply click the Full Desktop session collection and click the “Publish RemoteApp programs” link as shown in this screenshot:
RDS Deployment - RemoteApps 02
Doing so will convert the Full Desktop session collection to a RemoteApp programs collection, as mentioned in the remark below the link.

Publishing a RemoteApps collection
Click the Publish RemoteApp programs link.

Select RemoteApp programs
RDS Deployment - RemoteApps 03
Immediately you are presented with a list of available applications. If you have multiple servers in the collection pay attention to the text I highlighted in the screenshot.
If you want to publish programs that are not in this list use the Add button to browse to the program you want to publish. Note that you need to browse to a UNC path, not a local disk on the RD Session Host.
I selected Calculator, Paint and Wordpad.

As you can see, Notepad is missing by default.
Click Add.

Open
RDS Deployment - RemoteApps 05
Browse to \\itwrds04\c$\windows\system32 and select notepad.exe there.

If I browse to C:\Windows\System32 and select notepad.exe:
RDS Deployment - RemoteApps 04
So browse to Notepad.exe using the UNC path and click Open.

Click Next.

Confirmation
RDS Deployment - RemoteApps 06
On the Confirmation page you can see the UNC path is no longer visible, but is now shown as the actual path.
Click Publish.
The applications you selected will be published.

Completion
RDS Deployment - RemoteApps 07
Click Close.

Server Manager
RDS Deployment - RemoteApps 08
You’ll return to Server Manager and you can see the applications that were just published in the RemoteApp programs sections, including basic properties like Alias and Visible in RD Web Access.

Let’s finish the collection.

 

Finishing the RemoteApp programs collection
Server Manager
RDS Deployment - RemoteApps 09
In the properties section for the Full Desktop collection click Tasks and then click Edit Properties.

Session Collection
RDS Deployment - RemoteApps 10
Rename the collection to something more meaningful than “Full Desktop”. Also notice that “Show the session collection in RD Web Access” is now greyed out since it’s no longer a session collection.
Click Next.

User Profile Disks
RDS Deployment - RemoteApps 11
Review the settings in User Groups, Session, Security and Load Balancing, and adjust the settings in each section to your likings.
In User Profile Disks I changed the profile disks location to a different folder. Although that’s not really necessary in this setup it’s good practice to give each type of collection its own location for profile disks. Especially so if you’re planning for multiple types of collections in a single deployment. The reason I do this is because profile disks can’t be shared across types of collections. That’s right. You can’t. This means that if you have a deployment that supports Virtual Desktop Infrastructure (VDI), Remote Desktop session collection(s) and RemoteApp programs, you’ll have three different profile disks for each user. In deployments with a large number of users you’ll quickly see the need for a nice little tool like Sidder ;)
Click OK.

Now log in to the RD Web Access:
RDS Deployment - RemoteApps 13
It works, but we’re not done yet.

 

Editing a RemoteApp program
When we added Notepad.exe in the Wizard it created a RemoteApp called “notepad”. Let’s use this RemoteApp to demonstrate what we can manage for RemoteApps.

Server Manager
RDS Deployment - RemoteApps 12
In the RemoteApp programs section, right-click notepad and click Edit Properties.

General
RDS Deployment - RemoteApps 14
On the General page we can edit several attributes for our notepad RemoteApp.
We can change the RemoteApp program name. This is the name that is displayed in RD Web Access. Change this to “Windows Updates Log”.
We cannot change the RemoteApp’s alias here. You can only change the alias by deleting the RemoteApp and re-creating it using Powershell. More on that later.
We cannot change the RemoteApp’s program location here.
We cannot change the current icon here.
We can select to hide or show the RemoteApp in RD Web Access.
And we can select a Folder for the RemoteApp. If you click the dropdown menu you’ll notice it is empty. Don’t worry, just type in the folder name. Enter “Logfiles” here. This is the way to add new folders. If you have created folders before, you can select them using the dropdown menu.
Click Parameters.

Parameters
RDS Deployment - RemoteApps 15
If your RemoteApp program needs any parameters to run, this is the place to enter them. Enter “c:\windows\windowsupdatelog” for this one.
Click User Assignment.

User Assignment
RDS Deployment - RemoteApps 16
You can fine-grain user assignment on RemoteApp program level. For example, you can publish the complete collection to Domain Users, but limit this application to Domain Admins or Log Admins. In this case the Logfiles RemoteApp folder will be hidden for Domain Users as well, since this is the only application in this folder.
Review the remark in the bottom of the screenshot.
Click File Type Associations.

File Type Associations
RDS Deployment - RemoteApps 17
You can set desired File Type Associations for your RemoteApp program here. Take notice of the remark when you scroll down. What this means is that associations will only take effect if the RemoteApp is started through “Connected RemoteApp and Desktop Connections”, and not if you start it using custom RDP files, or through RD Web Access.
Since we just changed this one to publish the Windows Update Log, we don’t need any File Type Associations, I’ll get back to this later.
Click OK.

Review the list of RemoteApp programs and notice the change in RemoteApp Program Name:
RDS Deployment - RemoteApps 18

Refresh or log in to the RD Web Access and review these changes:
RDS Deployment - RemoteApps 19
Here’s the folder we entered.

RDS Deployment - RemoteApps 20
Clicking the folder shows the RemoteApp we just published.
Note: if you want to customize views like these, check out another step by step series I am publishing.
Click Windows Updates Log.

Windows Updates Log
RDS Deployment - RemoteApps 21
And it works.


Using Powershell to manage RemoteApp programs
Get-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215454.aspx) is used to list properties for RemoteApps.
Example:

Get-RDRemoteApp -alias "wordpad" | fl

Set-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215494.aspx) is used to set properties for RemoteApps.
Example:

Set-RDRemoteApp -Alias "wordpad" -DisplayName "WordPad - Renamed"

New-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215450.aspx) is used to create a new RemoteApp in a certain collection.
Example:

New-RDRemoteApp -CollectionName "RemoteApps" -Alias "regedit" -DisplayName "RegEdit" -FolderName "Admin Tools" -FilePath "C:\Windows\regedit.exe"

Remove-RDRemoteApp (http://technet.microsoft.com/en-us/library/jj215493.aspx) is used to remove a RemoteApp.
Example:

Set-RDRemoteApp -CollectionName "RemoteApps" -Alias "wordpad"

Get-RDAvailableApp (http://technet.microsoft.com/en-us/library/jj215457.aspx) is used to list available applications to publish in a collection.
Example:

Get-RDAvailableApp -CollectionName "RemoteApps"

Get-RDFileTypeAssociation (http://technet.microsoft.com/en-us/library/jj215461.aspx) lists the filetype association(s) for a certain application.
Example:

Get-RDFileTypeAssociation -AppAlias "wordpad"

Set-RDFileTypeAssociation (http://technet.microsoft.com/en-us/library/jj215459.aspx) is used to set the filetype association(s) for a certain application.
Example:

Set-RDFileTypeAssociation -CollectionName "RemoteApps" -AppAlias "wordpad" -FileExtension ".txt" -IsPublished $True -IconPath "%ProgramFiles%\Windows NT\Accessories\wordpad.exe" -IconIndex 0

 

And that concludes this step by step on publishing RemoteApp programs.

In the next part of this series I will show how to use and configure the “Connected RemoteApp and Desktop Connections” in combination with this setup.

Arjan

20+ years experience in Microsoft powered environments. Enjoy automating stuff using scripts, powershell, and even batch files. In my free time (hah! as if there is any) I hunt achievements and gamerscore on anything Xbox Live enabled (Windows Mobile, Windows 8, Windows 10, Xbox 360 and Xbox One). When I'm not doing that I enjoy traveling or riding my Yamaha R1 on the edge ;)

Tagged with: , ,
Posted in Remote Desktop, Step-by-Step guide, Windows 2012 R2
129 comments on “Step by Step Windows 2012 R2 Remote Desktop Services – Part 4
  1. John Carver says:

    Love the article, so was hoping that you have done one about setting up a Domain for the first time and the best practices to follow. If you have could you share the link? Or if you know of a good article that you could point me to, that would be great as well!

  2. Jess Gordon says:

    Thanks for posting this well written comprehensive article. Much appreciated.

  3. Hussnain says:

    What can i do to make the remote app programs accessible externally outside the internal network. I have been able to publish the full desktops to external users using rds gateway server but its not working for remote app programs. Any special configurations required for that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Authors
Donate Button

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 361 other followers

Blog Stats
  • 2,305,989 hits
%d bloggers like this: