Get-VHD / Optimize-VHD
CautionInspect/optimize VHDs
Get-VHD <path>
Shows VHDX size/type; Optimize-VHD compacts bloated dynamic disks — standard host-space recovery.
Examples
Optimize-VHD D:\VMs\web01.vhdx -Mode FullCompact a dynamic disk
Syntax
Get-VHD <path> / Optimize-VHD <path> -Mode Full
Before you run it
Optimization needs the disk offline.
Used when you see
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store