compact vdisk
Reduces the physical size of a dynamically expanding virtual hard disk (VHD) file. Windows commands reference
On Windows
Windows
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.
compact vdisk