Skip to content

Instantly share code, notes, and snippets.

@vonkoch
Last active December 18, 2015 21:39
Show Gist options
  • Select an option

  • Save vonkoch/5848633 to your computer and use it in GitHub Desktop.

Select an option

Save vonkoch/5848633 to your computer and use it in GitHub Desktop.
Win7 - Compact VHD
Use DISKPART to attach the VHD in read-only mode and then use COMPACT command:
diskpart
select vdisk file="path to .vhd"
attach vdisk readonly
compact vdisk
detach vdisk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment