24-01-2018, 08:20 PM
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
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