Resize User Profile Disks

Add a comment November 19th, 2013

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:

  1. The affected user have to be logged off so the .vhdx file is not mounted
  2. 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
  3. Take a backup (copy) of the file just in case…
  4. Resize the disk (either within Hyper-V Manager or with PowerShell)
  5. 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:

UPD1

 

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.

 UPD2

 Mount the .vhdx file and open Disk Manager

You’ll now see there are 1GB unallocated that you’ll have to claim

UPD4

Extend the disk/volume

UPD5

And the disk is now 2GB

UPD6

 

Remember to unmounts/eject the disk/volume so the user can log on again.

 

  1. June 27th, 2014 at 16:16 | #1
    Paul

    The term ‘Resize-VHD’ is not recognized as the name of a cmdlet

  2. June 27th, 2014 at 19:32 | #2
    Rune

    Hi, assuming you have Win2012/Win8 you’ll have to import the Hyper-V module.

    Import-Module Hyper-V (the machine you are doing this on needs the Hyper-V feature added).

  3. December 27th, 2014 at 08:36 | #3
    Joshua

    If in the case of Windows 8, it also needs to be the “Professional” version.
    cheers

  4. August 26th, 2015 at 12:05 | #4

    Expanding user profile disk using PowerShell:

    http://blog.it-kb.ru/2015/08/26/expanding-rd-user-profile-disk-upd-extend-vhdx-using-powershell/

  5. December 8th, 2015 at 08:43 | #5

    Run powershell from the Hyper-v host. Just type the path to the share where the UDP i stored. Worked perfekt for me.

  1. No trackbacks yet.
Comments feed


9 − = six