Wight Support Forum
Compact VHDX Files - Printable Version

+- Wight Support Forum (http://wightsupport.com/forum)
+-- Forum: Wightsupport Forums (http://wightsupport.com/forum/forumdisplay.php?fid=1)
+--- Forum: Windows Server (http://wightsupport.com/forum/forumdisplay.php?fid=14)
+--- Thread: Compact VHDX Files (/showthread.php?tid=27)



Compact VHDX Files - wightsupport - 24-01-2018

Sometimes after removing data from a VHDX the file will not compress through the Hyper V comsole. 

The following commands should allow compression

Right click Powershell and run as Administrator
Mount-VHD -Path C:\VHD\<name>.vhdx -ReadOnly
Optimize-VHD -Path C:\VHD\<name>.vhdx -Mode Quick
Dismount-VHD C:\VHD\<name>.vhdx