Resize User Profile Disks
If you have configured User Profile Disk (UPD) to be used with Virtual Desktops or Session Hosts (a.k.a. terminal services) you had to set a quota on the profile (the UPD which is a .vhdx file).
If you set the quota to i.e. 1 GB there might be some users filling it up with i.e. photos/videos and you’ll have to extend his/her .vhdx file:
- The affected user have to be logged off so the .vhdx file is not mounted
- Locate the UPD share and translate the user’s SID to username so you’ll get the correct file http://gallery.technet.microsoft.com/Retrieve-usernames-for-a-94780a9e
- Take a backup (copy) of the file just in case…
- Resize the disk (either within Hyper-V Manager or with PowerShell)
- Mount the file and extend the disk within Disk Manager
I’ll show how this can be done with PowerShell.
After I have located the correct .vhdx file you can see the (max) size is 1 GB:
Run the Hyper-V cmdlets “Resize-VHD”:
Syntax: Resize-VHD –Path <to the .vhdx file> -SizeBytes xGB
Here I increase the size to 2 GB.
Mount the .vhdx file and open Disk Manager
You’ll now see there are 1GB unallocated that you’ll have to claim
Extend the disk/volume
And the disk is now 2GB
Remember to unmounts/eject the disk/volume so the user can log on again.