Applies to: Windows Server 2012 and 2012 R2

Managing user profiles can be a big headache in any RDS deployment. Let’s face it, if you are not using a 3rd party solution to manage user settings, you are more likely to run into problems. The most common setup we see is the dreaded roaming profile solution. Well, Microsoft finally understands the issues people run into with profiles. So, with Server 2012 they have created their own solution which integrates directly into RDS as well as VDI. This new solution is called User Profile Disks.

User profile disks centrally store user and application data on a single virtual disk that is dedicated to one user’s profile. When the user logs on, their profile disk is attached to their session and detached when the user logs out. With this process, there is no copying of files on logon or logoff. Is this the most ideal solution for capturing user settings? No, but it’s simple, free, and better than using roaming profiles. The following will cover the process of enabling and configuring User Profile Disks for an RDS environment.

Requirements:

File Share per RDS Collection

RDS Collection

In a previous article, we looked at Collections, which give you the ability to group a set of RD Session Host servers with a common set of applications and publish them to users. These can be RemoteApp programs or Session Host and VDI desktops. Within these collections, you can enable and configure user profile disks. This can be done either at the creation of the collection or at a later time after the collection has been created. For our example, we will configure our user profile disks after the collection has been created.

Here is a screenshot of the User Profile Disk screen during the creation of the collection:

If the user profile disk was not configured while the collection was being created, you can go to the properties of the collection and edit the user profile disks there. But let’s not get ahead of ourselves yet. Before we begin configuring our user profile disks, we will first need a file share to house them. For this example I’ve created a new shared folder called: \\dc01\DemoLabOfficeApps. I named the folder the same name as my collection since user profile disks are for a single collection only. So if a user is connecting to resources from two different collections, the user will have two separate profiles. As a best practice measure, I named the share the same name as the collection which will make things easier in the event I need to troubleshoot an issue. When you create the folder share, you can use the default share permissions which is everyone: read.

After the shared folder is created, open Server Manager and within the Remote Desktop Services node, select the Collection. In the top right within the properties section, click on tasks and select Edit Properties.

In the user profile disk window, go ahead and enable user profile disks and enter the shared folder path. Then hit apply.

Once it’s completed, let’s go back and look at the security permissions of our profile disk share. Here you can see the RD Session Host RDSH01 which is the only server part of the collection, now has full control to the folder:

And if we look at the share permissions, RDSH01 has full control as well.

At any point, if I decide to add more RD Session Host servers to the collection, the wizard will automatically modify the security of the folder and give full control to the new session host servers’ computer account(s). That is one less thing for an admin to think about when they are adding new hosts into a collection.

Go ahead and open the folder. There you will see a new file called UVHD-template.vhdx.

This template will be used to create the user’s profile disk. After a user logs in for the first time, a new vhdx file will be created with the user’s SID as part of the file name.

So from the outside, when we look our user profile disk folder, we will just see a bunch of vhdx files with the user’s SID as the name. It would be nice to have an option to name the profile disks with the user’s username.

Lets go ahead and take a look inside the user’s profile disk. If we right click on the user’s vhdx file (disk), we can select the option to Mount the vhdx disk. (The disk will not mount if the user is currently logged into the collection. Also, if the share permissions are kept at the default which is read-only for everyone, you will need to go directly to the file location bypassing the shared folder)

Once the disk is mounted, it looks like nothing more than a regular user profile. If the user is logged in and browses to their profile, it will be transparent to them as well. The icon is only slightly different.

When using the default settings, the user’s profile disk will contain everything that is in a user profile.

However, you have the option of changing this. If there were certain folders you wish to exclude from the user profile disk, you can do so by adding the path under the “Exclude the following folders” section. When a user logs out, any folder in the exclusion list will not be preserved.

Another option you have is to only store specific folders on the user profile disk. Lets look at a scenario where we only wanted to keep the user’s roaming data for the user’s profile. This means folders like appdata\local would automatically be excluded and not preserved when a user logs out. Here I have selected to only keep the user’s roaming profile and registry data.

When the user logs in, their profile will look normal within their session, but after the user logs out, their profile disk will look like the following:

And if we look under the appdata folder, we will only see the roaming directory.

This option is great since it is focusing on the real important pieces of a user’s profile, however in some cases this can cause problems, especially if the users are connecting to a desktop with a customized Start Screen. They will lose their settings once they log off because these settings are held within a file called appsFolder.itemdata-ms located in the directory (AppData\Local\Microsoft\Windows). Since we have the user profile disks configured for the roaming data of a user’s profile only, we will need to include this folder to our user profile disks. To do so, click on the add button and add the directory (AppData\Local\Microsoft\Windows).

Once completed, the directory (AppData\Local\Microsoft\Windows) will now be preserved in the user’s profile disk.

As you can see, user profile disks are very easy to setup and configure. Its a great out of the box feature for any 2012 RDS/VDI deployment. However, regardless of what profile solution is used, all common best practices should still be applied which includes the use of folder redirection.

© 2014 Eddie Kwasnik “the Wolf” All Rights Reserved