The following steps assume that you already have a basic Session-Based Desktop Deployment running, with an RD Connection Broker, an RD Web Access and at least 1 RD Session Host. As you probably know these roles can run on a single Windows Server 2012 box. We also assume that a basic Deployment and Session Collection have been created. Besides basic deployment the only prerequisite for setting up UPD is having a central share where we can store the User Profile Disk itself. In this demo we’ll be using a virtual machine running Windows Server 2012.

 

  1. We create a new folder, in our case U:\UPD

 



Figure 1:
UPD folder

  1. Using the Server Manager console we create a new share. We won’t go over all the steps there, basically, we create a SMB share using the wizard, and leave the permissions intact. We then browse to the path to make sure it accessible.



Figure 2: UPD Share

  1. Within the Server Manager we open the Remote Desktop Services Management (RDMS), and open the properties of the Session Collection.



Figure 3: Session Collection Properties

  1. We select the User Profile Disks tab, and select “Enable user profile disks”. We then provide the UNC path of the share we just created, provide a maximum size, and (as a first step) we configure to store all user settings and data inside the profile disk.



Figure 4: User Profile Disk properties

  1. That’s all for the configuration.

When we go back to the share, we’ll see that a new file has been created called UVHD-template.vhdx. This is the template file we mentioned earlier in the introduction.



Figure 5: UHVD-template

For every new user that logs on to an RD Session Host in this Session Collection a new .vhdx file will be created based on the template. As you can see the users GUID will be used in the name of the file.



Note: Obviously searching for a specific UPD file is not that easy, since the filename consists of the users SiD. There is a PowerShell script on TechNet Gallery to get an overview about what user is connected to what UPD file: Retrieve usernames for a User Profile Disks (UPD) share in VDI environment



Figure 6: UHVD files per user

As described earlier in the introduction, on the RD Session Host servers the .vhdx file is mounted underneath C:\users\<username>. Also, note that UPD makes sure that if an existing cached copy of a roaming profile is in place it will create a backup, by renaming that folder to <username>-BACKUP-<number>. Since this is a mounted volume, it’s fully transparent for applications that need to read and write to the profile.



Figure 7: Mount point in C:\Users\<username>

When the user that owns the .vhdx is not logged on, administrators are also able to simply mount the .vhdx file to see what’s inside and even make modifications if necessary. Just be sure to unmount the file again before the user logs on again.



Figure 8: Mount a .VHDX file



Source: http://virtualizationadmin.com/articles-tutorials/vdi-articles/general/working-with-user-profile-disks-on-session-based-desktop-deployments.html

Script to show users names per UPD file: Retrieve usernames for a User Profile Disks (UPD) share in VDI environment