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 and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store