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
#1 by Nathan on November 24, 2014 - 12:35 pm
Epic. Very Nice post.
#2 by Lele on December 1, 2014 - 11:50 am
is their anyway to setup UPD apply to only some users and not all users?
#3 by Eddie Kwasnik on December 1, 2014 - 12:35 pm
Not to my knowledge since the profile disk is set at the collection level.
#4 by Roydelf on December 11, 2014 - 6:40 am
Good post, thanks!.
I am looking to set this up for one of my clients soon. They are currently using roaming profiles and would like to move them onto using User profile disks when I create the environment.
Do you think the roaming profiles will load the users data into the User profile Disk or would you advise a different approach?
#5 by Eddie Kwasnik on December 11, 2014 - 9:30 am
Thanks. That’s actually a great question and something I have not tried myself. The profile disks are used as an alternative to a roaming profile so it is intended to use one or the other. If you do try it out, could you share the results?
#6 by Frank Rettenbach on January 29, 2015 - 4:30 am
I am facing the same sitouation. Have you been able to figure this out?
#7 by Roydelf on February 25, 2015 - 6:16 am
I have not set this up yet but looking into this I can see you have the option of selecting to include the roaming user profile data to the UPD which looks promising.
I will try this out in my test lab this week and let you guys know if it works OK.
#8 by Ingmar Snippe on July 15, 2015 - 9:56 am
You can mount the specific User Profile Disk of the user you want to move. And after that you can copy all the roaming data you want into the UPD. You could even use something like robocopy to quickly select the right folders.
#9 by pascalandreas on December 16, 2014 - 8:02 am
How do you manage it?
Right now I have a list of 30-some disks only with SIDs as names.
– It’s hard to pinpoint which one is the user disk you are looking for.
– It’s hard to see why a profile is suddenly 5 GB – because it’s already mounted and in use.
– The disk size does not shrink when it is less utilised – e.g. the user empties downloads folder.
– In our case it was setup with System Volume Information enabled, so now e.g. we have a user profile disk that is 9.8GB but is only 1.4GB is actually used.
Are we missing a basic management tool?
#10 by Eddie Kwasnik on December 16, 2014 - 9:29 am
I feel your pain. Its a great concept by MS, but it lacks proper management. I prefer using third party tools to manage users settings. I hope they improve it in any upcoming release.
#11 by Anthony Larson on December 16, 2014 - 3:13 pm
Hello Eddie, Which third party tools do you use?
#12 by Eddie Kwasnik on December 17, 2014 - 10:39 am
The three main one are RES, AppSense, and Liquidware Labs Profile Unity. Out of the three, I prefer Liquidware Labs Profile Unity since it can do everything the other ones can do but its simpler to use and has the best price.
#13 by Shimon Adimor on January 26, 2015 - 5:40 pm
This is a good post.
I do have a few questions though.
1. I am already a few GPOs like Prevent Access to command prompt, Remove Lock Computer, and a couple more, and I noticed the following: “Set RDS User Home Directory” and the “Set path for the RDS Roaming User Profile”. What I was hoping is that the UPD settings take care of it all – is it correct or there still is a need to use these GPOs as well ?
2. If I need to change the UPD path to a different location – what would be the steps to accomplish that ? (I’m still in testing mode, but very close to production)
3. When I make a UPD change in the collection – does it take the same time as it takes a GPO to update (like 90 minutes) or is it supposed to be effective immediately ?
#14 by Eddie Kwasnik on January 27, 2015 - 2:53 pm
Great questions. If you set a user’s Home Directory via the GPO, it will have no effect on the UPD. Assigning the Home Directory is always a great thing to do regardless of what profile solution is being used. If you choose to use the UPD option, there is no need to set the RDS users roaming profile path since everything will be under their profile disks. Will users be accessing a single collection? The upd is bound to the collection where as the rds roaming profile is not, however; roaming profiles are usually not the best option.
As for your second question on moving the UPD location, will you be copying everyone’s UPD to the new location? This is something which I have not tested myself so unfortunately I do not have the steps to accomplish this. I guess as long as the RDSH servers of the collection have the correct the permissions on the new share, theoretically it should work. The permissions will be applied when you change the location on the properties of the collection. If you do try this out, please let us know the results.
As for the last piece, I believe once it is set it will affect any new users logging into the RDSH servers.
#15 by Dan Mueller on February 19, 2015 - 4:38 pm
I’m having problems with getting temporary profiles when the users log on. I’ve been able to determine the UPD gets created the first time a user logs on but then gets locked by the session host. I’ve been unable to find a fix for this and it seems this has been an ongoing issue with UPDs since Server 2012.
Do you have any suggestions as to how I can resolve the issue?
#16 by Eddie Kwasnik on March 18, 2015 - 8:59 am
Not sure if you solved your issue, but definitely try the following hotfix.
#17 by Darrell Null on February 26, 2016 - 12:26 pm
I do not see the hotfix listed here unless I am missing something.
#18 by Jeff on February 25, 2015 - 2:48 pm
Great write up. Question. Is there a way to have the UPD mount on a different volume. Example, instead of it showing up under c:\users, it would show up under x:\users? We block access to C on our RDS, which is causing issues accessing the data on the UPD.
#19 by Eddie Kwasnik on February 25, 2015 - 3:33 pm
That’s a tough one. You can try the following and see if that works. http://support.microsoft.com/kb/949977/en-us
#20 by jen0va on February 26, 2015 - 5:59 am
Is it possible to apply quota on User Profile Disk (GPO) ? Wich way to achieve this goal ?
#21 by Eddie Kwasnik on February 27, 2015 - 7:46 am
You can actually set it when you configure the profile disks. See the image below. Here it is set at a default of 20GB for the maximum size, however you can modify it accordingly.
#22 by Reagan on March 10, 2015 - 5:36 pm
Thanks for all your posts, I have deployed a RDS Server farm reading these posts.
While deploying, I set maximum size of UPD to 2 GB without thinking of any further requirements. Now the UPS have started touching the higher limits and I am looking out to see if there is a option now to increase this size, as this option is grayed out.
Thanks in Advance for your help.
#23 by Eddie Kwasnik on March 18, 2015 - 9:26 am
Reagan, thank you!
I don’t know of a way to extend the size for all of the profile disks at the parent level without having to recreate all of them. The quota is set on the template vhdx when the UPD is configured so when a user logs in, they will have a max size set on their own vhdx (profile disk) since it is created off of the template vhdx profile disk. You can extend the individual user’s profile disk, so if it is only for a handful of users, it wouldn’t be too tough of a task. You can do it in two ways. The first is to use the command Resize-VHD
The other option is to mount the vhdx file when not in use and use the disk management mmc to extend it.
Also, in theory, you may be able to extend the template vhdx to a greater size and this will affect any new users connecting to the environment. I have not tested this out though.
#24 by bonezoz on March 10, 2015 - 6:35 pm
I’m in the process of adding additional RDS Session hosts to an existing farm. While I’ve successfully added the host, the user profile disks are not attaching. Is there a way to force or apply the profile disks whenever adding additional hosts?
#25 by Eddie Kwasnik on March 18, 2015 - 9:01 am
Did you add the host to the specific collection where the profile disks are configured?
Also, take a look at the following hotfix regarding UPD:
#26 by bonezoz on March 10, 2015 - 6:37 pm
I’m in the process of adding additions hosts to an existing farm, but the user profile disks are not attaching. Is there an addtional step to follow when adding new hosts?
#27 by Eddie Kwasnik on March 18, 2015 - 9:02 am
Not really. Once it is part of the farm, you can then add it to the appropriate collection and it should attach to the user profile disks for users.
#28 by Brandon on April 8, 2015 - 1:57 pm
Great post. Was wondering how to shrink a users profile once they are logged out? Have a few users that have reached their max limit, and after cleaning up their profile, it still says they have the same amount of space in use.
#29 by Eddie Kwasnik on April 13, 2015 - 8:38 am
How are you cleaning up their profile? by mounting the vhdx file?
#30 by Bryan_T on November 20, 2018 - 4:00 pm
To reduce the size of the UPD file (assuming that you deleted the user’s data inside the vhdx file and the file size on the disk is less than the size assigned to it), you can use the commands:
resize-VHD \\rdvh\DemoLabOficeApps\UVHD-.vhdx –ToMinimumSize
#31 by Brandon on April 14, 2015 - 1:45 pm
I have done it that way and also from the users profile session itself.
#32 by Brandon on April 14, 2015 - 2:04 pm
This a link I posted to Spiceworks Community. Maybe from the pics you can see what I’m talking about.
#33 by Geir O. Jensen on April 22, 2015 - 9:30 am
Great post “as usual” 🙂 Just set up my user profiles – had to twiddle a bit with security options on the share though, since the profile shares are hosted on another fileserver!
#34 by Eddie Kwasnik on April 22, 2015 - 10:24 am
Thank you! Glad to hear it is working…
#35 by Geir O. Jensen on April 24, 2015 - 4:06 am
Uhm well, actually it may not be working like I thought… when logging on the “console” with the administrator I get a warning about temporary profile… saw it mentioned above aswell – but the link posted only applied to Win 8 and Win 2012, not 2012R2?
It also seems like my GPO’s aren’t applied for users when they log on, but that may be another issue… (we like to disable all the first run stuff from Office for instance…)
#36 by Eddie Kwasnik on May 7, 2015 - 9:24 am
Sorry for the late response. The upd will work for 2012R2. If the gpo’s are not applying, there may be some other issue going on. Were you able to get it working?
#37 by Faizan Ansari on May 7, 2015 - 4:06 am
Very helpful article. I have to deploy RDS on the customer and they want to use User Profile Disk in HA. Making failover windows cluster with file server is one of the solution according to my knowledge. The user data is around 15TB. Is there any other and better solution regarding User Profile Disk HA..
#38 by Eddie Kwasnik on May 7, 2015 - 9:14 am
Thank you. Yes, there are many better solutions to use over the UPD. The answer is a third party product like Liquidware Labs Profile Unity. It does what it needs to do at a lower cost than its competitors. Others includes RES and AppSense environment manager.
#39 by Markus F. Meisinger on May 7, 2015 - 4:28 am
Thanks too for this how-to Setup … i am already using VDI a while now … i like UPDs … and want to use them for my “Desktop” workstations too … are there any how-tos available … how-to configure … do you know how UPDs work under the hood, because I can mount a users vhd on a desktop can create a junction point but after the users has finished logon he got a temporary profile folder instead of the mounted user vhd
#40 by Eddie Kwasnik on May 7, 2015 - 9:16 am
UPDs are still in its infant stages so they can have a tendency to be problematic. When possible, I use third party profile solutions as they have been around a while and do a great job.
#41 by Fandy Backers on May 13, 2015 - 2:48 am
When i use profile disks with the rds services, and when the system has run an windows update and rebooted when the user still had a connection, the user can’t do anything anymore when the user connects again. The admin has to logoff the user at his account, and then the user can login again and work. So when an update has taken place (with reboot) when a user still was connected (not logged off) he/she can’t do anything anymore! I have this problem for a long time now.. why is microsoft not fixing this?! or can i do something about this myself what i don’t know of?
This really irritates me since the beginning of using profile disks..
I also gets a lot of backup directories next to the live profiledisks.. also still a long time waiting for a fix..
#42 by Eddie Kwasnik on May 26, 2015 - 4:43 pm
In about 20 years, Microsoft has only made a couple of changes to their profile design so I personally don’t expect them to do much more than give a basic type solution for profiles. I probably sound like a broken record at this point, but it is better to leverage third party solutions for profile management.
#43 by Tony Platts on June 4, 2015 - 6:57 am
I really liked the idea of user profile disks but I’m really struggling with them for one reason.
As soon you you prevent access to the C drive (which you should do in almost every installation of RDS) you prevent users from accessing those items which would typically exist on the C drive.
Anyone found a way around this?
#44 by Tony Platts on June 4, 2015 - 7:10 am
Just another thought. We have Office installed on our RDS Farm. With the C drive locked down, when a user opens up any Office app, and attempts to “Open a document”, they get two error messages stating “The operation has been cancelled due to restrictions in effect on this computer”.
This makes me think that User Profile Disks are not compatible with locked down C drives which pretty much makes the whole thing useless. Am I wrong?
#45 by N. Haanstra on September 3, 2015 - 9:31 am
I totally agree. Quite useless if we can’t use the ‘prevent access to the C drive’.
#46 by Crispin on July 14, 2015 - 12:02 pm
Eddie! cracking job on documents, ive set up an RD farm with gateway server in no time thanks to your clear logical steps and explanations. one of the best set of notes ive seen and used in many years
#47 by Francois on July 21, 2015 - 4:28 am
I realized an important issue whilst reading the comments above. We had issues with UPD and host servers that are taken out of service. When a host server is taken out of service (i.e. it doesn’t allow new connections) and an existing user signs out and then back into the collection the subsequent connection is not allowed to reconnect to the session on the out of service host server. The result is that the user gets signed in on any one of the remaining host servers in the collection with a temporary profile because the out of service host server is holding onto the UPD for as long as the disconnected session lives on it. I have set my RDS collection to sign out disconnected session after 15 minutes (down from 2 hours), but it is still possible for this issue to crop up inside that 15 minute period. Does anyone know of a solution to this issue?
#48 by Dominic on August 18, 2015 - 4:19 am
adding the \appdata\local\Microsoft\Windows just isn’t right!!!!
Remove the \appdata\local\Microsoft\Windows from UPD
As far as i got to customize the start menu is
Login as a user and setup you menu etc..
Go to C:\Users\%userprofile%\AppData\Local\Microsoft\Windows and copy the two files
copy to a location like \\yourdomain\SYSVOL\yourdomain\scripts\startmenu
Now create a batchfile with the below in it
xcopy \\yourdomain\NETLOGON\Start\appsFolder.itemdata-ms C:\Users\%username%\AppData\Local\Microsoft\Windows /y
xcopy \\yourdomain\NETLOGON\Start\appsFolder.itemdata-ms.bak C:\Users\%username%\AppData\Local\Microsoft\Windows /y
The /y switch overwrites the existing files.. Note you need to reboot once after this batch file is applied! not ideal but only way i could find.
So in the folder you have 3 files
appsFolder.itemdata-ms & appsFolder.itemdata-ms.bak
Then the Batch file you created
Now Run the Copystartmenu.bat at login with GPO or All users startup ( or just run logged in as a test user to test).. Now is you use GPO scripts in 2012 r2
Default delay is 5min after login.. You’ll need to change the following gpo
Computer/administrative templates\system\group policy\configure login scripts delay
Sorry could add Photo until account was verified
NOTE YOU NEED TO LOG OFF ONCE FOR THE CHANGE TO WORK. Anyway hope this helps for people wanting to use User Profile Disks
#49 by Алексей Максимов on August 26, 2015 - 8:08 am
Expanding user profile disk using PowerShell:
#50 by The Sock Mistress on December 8, 2015 - 9:00 pm
Great article, we are just about to deploy this for a client so this is a helpful summary.
#51 by R on December 10, 2015 - 5:54 pm
These UPDs would be all very nice… if they actually worked
check these forum posts:
after 3 years and multiple tickets to MS, hundreds of people still have problems using UPDs due to users randomly getting temp profiles for no logical reasons or random corrupt profiles
Adding insult to injury one customer disclosed that “Microsoft is refusing to troubleshoot our issue because it is virtualized under vmWare ESXi. They require we reproduce the problem on a physical machine”. Needless to say these problems happen on physical machines too.
Steer away people while you still can…
#52 by Zerics on May 10, 2016 - 10:35 am
I have recently deployed a new envoirment with UPD’s and I got the corrupt profiles problem, around 5-10% of the users got corrupted profiles everyday and i have read throu many searchresults in search for an answer, I might have found one now when I wasn’t looking for it, I was reading up on the RDS Blog, and suddenly there it was..
A hotfix that matches my problems excatly
This issue occurs if the ‘Store only the following folders on the user profile disk’ option is selected together with ‘User registry data.’ ”
I hope this helps!
#53 by Glen Harrison on March 9, 2016 - 7:10 am
When removing items from the UPD such as desktop etc etc, upon clicking the apply button I get the error “User Profile Disk location is already in use” Any ideas? I only want the appdata and registry settings. Thanks.
#54 by Eddie Kwasnik on March 9, 2016 - 9:44 am
Is the user still logged in when attempting to copy the files?
#55 by Jeremy on April 13, 2016 - 4:55 pm
I’m in the process of migrating users from a Child domain to the Parent domain. This causes a new UPD to be created when the user remotes into the RDS farm. Is there anyway to stop this so that it will continue to use the existing UPD file? It’s going to be a huge pain when users don’t have their settings and files from their original profile. I appreciate any help.