Export (0) Print
Expand All

Compact vdisk

Published: April 17, 2012

Updated: April 17, 2012

Applies To: Windows 7, Windows 8, Windows Server 2008 R2, Windows Server 2012

Reduces the physical size of a dynamically expanding virtual hard disk (VHD) file. This parameter is useful because dynamically expanding VHDs increase in size as you add files, but they do not automatically reduce in size when you delete files.

noteNote
This command is only applicable to Windows 7 and Windows Server 2008 R2.

compact vdisk

  • A dynamically expanding VHD must be selected for this operation to succeed. Use the select vdisk command to select a VHD and shift the focus to it.

  • You can only compact dynamically expanding VHDs that are detached or attached as read-only.

To compact a dynamically expanding VHD, type:

compact vdisk

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft