JAEN

Virtualization

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

VM running slow
3
Check and compact bloated virtual disks
See the whole flow →

Related commands

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