Clean Up your template before Sysprep and Capture a reference image in MDT

When you create a reference it will in most cases it will be updated with patches. That will make the bigger and bigger and there fore the of that image will take longer and consume more network resources & unneeded disk space. That can be corrected by getting rid of superseded patches, junk, temp files and much more.

The Solution

Since is the preferred method to create reference images you can download the script, import it as an application and then run the application just before the and Capture step. The Script works for the following versions of :

To make this work in Windows 7 and Windows you need to add a hotfix to Packages in MDT. http://support.microsoft.com/kb/2852386

Download the script

Download the script from here: Mirror Mirror 2

Action-CleanupBeforeSysprep Applicationimage

Task Sequenceimage

Created a Group Clean.
Add install a application –> Action-CleanUpBeforeSysprep
Restart Computer (Very Important) without it will not work

image

Source