I was recently contacted by someone regarding one of my previous blog posts called Predefining and customizing the Modern UI Start Screen on RDS 2012 where I describe a way to create a predefined Start Screen layout for Remote Desktop Sessions running on Windows Server 2012 and still allow users to modify that predefined Start Screen to their needs.He was wondering how this method would work in combination with using User Profile Disks. I’ve also seen similar comments on that blog post in regards to that combination. Enough reason to test this combination in my lab and I hereby want to share the results with you.
If you’ve read my blog post you’ll know that the items on your Start Screen are not stored in a folder within your profile but are in fact stored in a binary file called appsfolder.itemdata-ms which is stored in %USERPROFILE%\appdata\local\microsoft\windows\.
With Use Profile Disks (UPD) you no longer use a (cached copy of) roaming profile. In stead, your profile is stored in a .VHDX file specific to your account which is placed on a central share. Upon logon a mount path is created under C:\Users\<username> that points to that .VHDX file on the share. This makes the solution fully transparent to the Operating System and applications. If you’ve used UPD before you will have noticed that the filenames of the .VHDX files hold the users SID, not the account name. To get a quick overview of what account name is coupled to what .VHDX file check out my script Retrieve usernames for a User Profile Disks (UPD) share in VDI environment on Microsoft TechNet Gallery.
Part of the configuration of UPD is to configure what folders of the profile you want to be part of UPD. In order to do so, open the RDMS as part of the Server Managed Console en edit the properties of your Session Collection.
Choosing the option “Store all user settings and data in the user profile disk” would obviously capture everything normally stored under C:\users\<username> and add that to the UPD. That will obviously also include the path of the appsfolder.itemdata-ms file (\appdata\local\microsoft\windows\). However in most cases you would want a more granular control of what’s going to be stored in the UPD. To do so you select the option “Store only the following folders on the User Profile Disk”. After that you can make a selection based on the most common folders. Notice however that you can only select the roaming part of your user profile data. This means that \appdata\local\ will be excluded, and thus so will the appsfolder.itemdata-ms file.
However, besides being able to select the most common folders you can also add additional files & folders as desired. To test this we add the following, which is a relative path to the file where the Start Screen is stored.
When we configure this (in combination with the configuration I refered to earlier) and log on with a test user, a UPD file is created successfully.
And the user seems to get the Start Screen Layout as pre configured.
However, when we look at the system drive of the RD Session Host Server we notice that a temperately profile has been created where we would have expected a mount point to the UPD file.
Upon logging off the user, the temp profile folder is obviously gone, but when we try to mount the UPD file we are presented with the following error:
Apparently in this scenario the .VHDX file doesn’t get detached properly. We manually detach the VHDX using Disk Management
We are now able to mount the .VHDX and check what’s inside and notice that the file we specified is not in there. (only the roaming part of the User Profile Data).
So apparently the method of selecting the file as an additional file does not work and causes the UPD to not be able to detach properly.
Does this mean that the combination with UPD simply does not work properly for this scenario? Upon some further testing I discovered a workaround to make this work.
After removing the UPD file of the test user, in stead of adding the file inside the UPD configuration, we add the folder where the file resides.
Upon log on, again a VHDX file is successfully created and user is represented with the pre-defined Start Screen.
This time however we notice that that on the RD Session Host server the mount to the UPD file is successfully created (and no TEMP profile is showing).
When we do a drilldown inside this folder we see the desired behavior. The Windows Folder is a mounted folder.
Upon logging of the user, the UPD file is correctly detached, and when mounting the UPD file as an administrator we see that the folder \appdata\local\microsoft\windows is now part of the UPD file.
And so is the appsfolder.itemdata-ms file and as a result customization to the layout of the Start Screen can now be roamed to other servers within the Session Collection!
Final remarks: The ability to pre define the Start Screen has been improved in the R2 release of Windows Server 2012 and has become configurable using a GPO. More details on that: Predefining and customizing the Modern UI Start Screen on RDS 2012 R2