Wednesday, 24 June 2015

User Profile Disks for RDS 2012 / 2012 R2

User Profile Disks for RDS 2012 / 2012 R2

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 3rdparty 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:
1
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.
2
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.
3
In the user profile disk window, go ahead and enable user profile disks and enter the shared folder path. Then hit apply.
4
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:
5
And if we look at the share permissions, RDSH01 has full control as well.
6
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.
7
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.
8
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)
9
10
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.
11
When using the default settings, the user’s profile disk will contain everything that is in a user profile.
12
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.
13
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.
14
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:
15
And if we look under the appdata folder, we will only see the roaming directory.
16
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).
17
18
19
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.

1 comment:

  1. Las Vegas Hotel & Casino - JMHub
    Enjoy a stay at the 춘천 출장마사지 Wynn 강릉 출장안마 Las 양주 출장안마 Vegas Hotel & Casino in Las Vegas Strip, NV. Check 서산 출장마사지 guest reviews, photos and 광주광역 출장마사지 more. Rating: 3.5 · ‎847 votes

    ReplyDelete