You perform a full installation of Windows Server 2012 R2 on a virtual machine named Server1.
You plan to use Server1 as a reference image.
You need to minimize the amount of storage space used by the Windows Server 2012 R2 installation.
Which cmdlet should you use?
The Optimize-VHD cmdlet optimizes the allocation of space in or more virtualhard disk files, except for fixed virtualhard disks. The Compact operation is used to
optimize the files.
This operation reclaims unused blocks as well as rearranges the blocks to be more efficiently packed, which reduces the size of a virtual hard disk file.