Defragmenting WIM files

by Mitch Tulloch [Published on 9 Oct. 2012 / Last Updated on 9 Oct. 2012]

A tip on how you can shrink a large WIM file by defragmenting it.

Custom Windows Imaging (WIM) files captured from reference installations can sometimes be large due to the presence of numerous installed applications, language packs, and device drivers.  I've even heard of some WIM files for Windows client installations being more than 20 GB in size!  Even if you're using WDS to multicast deployment of such images, on a 100 Mbps network such transfers can sometimes take hours to complete.

One thing you can try doing is to deframent the WIM file.  If the WIM file is fragmented, then defragmenting it may reduce its size considerably.  To defragment a WIM file, you can export it using the ImageX command by including the /Export parameter. For more information, see http://technet.microsoft.com/en-us/library/cc749447(v=ws.10)

Mitch Tulloch is a eight-time recipient of the Microsoft Most Valuable Professional (MVP) award and widely recognized expert on Windows administration, deployment and virtualization. For more tips by Mitch you can follow him on Twitter or friend him on Facebook.

Featured Links