Forum Discussion
szuguan
Feb 20, 2025Copper Contributor
Increase the size of user profile disk in my remote desktop server
Hi all experts. I have a server for remote desktop services purposes, Windows 2016 standard, and domain joined.
It is configured using User Profile Disk, and the maximum limit is set to 5GB. I want to increase the maximum limit but I can't do it under the collection's properties because that field is grayed out. My questions:
- How to increase the maximum limit? Please guide me and let me know how.
- Can I increase the maximum limit for 1 single user only? If yes, please let me know how.
- I found some info from the web that this can be done by the Diskpart command, is it true? If I follow the Diskpart method, do all user profiles encounter data lost?
I need your guidance and input, I appreciate it.
Here are some images:
hi szuguan,
What you need to do is easy, you launch dispart, you execute the commande "select vdisk file=<VHDX>" and you execute the commande "expand vdisk maximum=<New size disk>" and after that you attach the disk in disk manager and extend the disk.
Example:
- micheleariisSteel Contributor
Hi, it looks like the issue is that there isn’t any unallocated space immediately following the partition inside the VHDX. When “Extend Volume” is grayed out in Disk Management, it’s usually because there’s no adjacent free space available.
For Diskpart, instead of using “list volume”, try “list partition” after attaching the VHDX. Often, especially in VHD files, the partition you need to extend appears in the partition list rather than the volume list.
Try these steps:
Attach the VHDX:
select vdisk file="PathToYourFile.vhdx"
attach vdiskCheck for partitions:
list partition
If you see the partition you want to extend, select and extend it:
select partition X
extend(Replace X with the correct partition number.)
Additionally, ensure that:-The VHDX file itself has been expanded (right-click > properties in Hyper-V or use PowerShell).
-The partition inside the VHDX has space to expand.
-If there’s no unallocated space, you’ll need to first increase the VHDX file size before extending the partition. - micheleariisSteel Contributor
Hi, to increase the 5GB “User Profile Disks” limit on a Windows 2016 RDS server (when the GUI option is grayed out), follow these steps:
Change the global limit (if possible):
Use PowerShell:
Set-RDSessionCollectionConfiguration -CollectionName "YourCollectionName" -SizeInMB <NewSize>
This updates the limit for new profiles, but existing profiles remain at the old size unless you manually expand them.
Manually expand existing .vhdx files:Ensure the user is logged off.
Locate the .vhdx file (e.g., UVHD-S-1-5-21-xxxx.vhdx) in the configured profile path.
Mount the file in Disk Management (Action > Attach VHD) or via diskpart.Extend the volume inside the .vhdx (in Disk Management, use “Extend Volume” or in diskpart use:
select vdisk file="C:\Path\To\File.vhdx"
attach vdisk
select volume <Number>
extend
Dismount (detach) the VHD.
When the user logs on again, they will see the increased space.
Increase the limit for a single user only:Simply expand that user’s .vhdx file manually, as above, without changing the global setting.
Data loss:If you correctly extend the volume, no data is lost. You’re just adding more space.
Additional tips:If needed, temporarily disable “User Profile Disks” in the Collection to avoid conflicts.
Always have a backup of your .vhdx files before making changes.- szuguanCopper Contributor
Hi Micheleariis,
Thanks for your answer and guide. I have tried but am stuck at the "Manually expand existing .vhdx files:" I am sure the user is signed out. First, I successfully "attach vhd" in disk management, I can see an additional volume there, and a drive letter "F" is assigned to it. I right-click the volume and see the "Extend Volume" is grayed out, nothing I can do here.
Secondly, since I have no luck in disk management so I go to use diskpart. The "select vdisk" and "attach vdisk" executed without problem, but when I do the "list volume", I can not find the volume I want (I've checked many times).
Please advise, thank you.
- L_Youtell_974Iron Contributor
hi szuguan,
What you need to do is easy, you launch dispart, you execute the commande "select vdisk file=<VHDX>" and you execute the commande "expand vdisk maximum=<New size disk>" and after that you attach the disk in disk manager and extend the disk.
Example: