The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Nice to Know – Reduce the size of your Windows 8.1 WIM after patching and before doing a capture

Posted by Mikael Nystrom on December 23, 2013

Yes, finally it is doable, for real and it gets smaller too :-)

The Problem

Not really a problem maybe, but when the ref image gets bigger and bigger for every time you create one and you KNOW that it is just old patches and new code that consumes the space, you really want to get rid of all the junk. There has been some “do this, it works but it is not really sported”, but now we really have a solution for this.

The solution

Using dism with the new /resetbase it is now possible to cleanup the image and remove all the old patches, however, there is one downside here, when you cleanup, there is NO way to uninstall a patch, since that patch is now “base”. So you should only do this when your image is stable and have no issues at all.

Note: the /resetbase only works on a Windows 8.1 or Windows Server 2012 R2 image, there are other solutions for older legacy systems, like Windows 8 and such, and yes, I’m working on posts for that too.

How?

Online:

Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase

Offline:

DISM /Image:C:\MyDir\Mount /Cleanup-Image /StartComponentCleanup /ResetBase

In the TaskSequence:

image

On TechNet:

http://technet.microsoft.com/en-us/library/dn251567.aspx

/mike

4 Responses to “Nice to Know – Reduce the size of your Windows 8.1 WIM after patching and before doing a capture”

  1. Milos said

    So to uninstall would it be possible to reinstall a patch and then uninstall.

  2. CLParker said

    Reblogged this on MDTGuy.WordPress.com and commented:
    Excellent post from The Deployment Bunny! Check it out!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: