Wally Mead (DeploymentBunny) wrote a great script that accommodates his image factory. It performs several clean up operations before running sysprep. I run it manually on all of my Virtual Machines prior to running a Sysprep and Capture routine. I’ve seen this script reduce a WIM file by 10GB.
-
Jump to Wally’s github and save the script you’re your MDT Deployment Share’s script folder: https://raw.githubusercontent.com/DeploymentBunny/Files/master/Tools/Action-CleanupBeforeSysprep/Action-CleanupBeforeSysprep.wsf
-
From your Virtual Machine, map a drive to your Deployment Share and run the ZTIGather.wsf script. The purpose we run this first is to populate the OSCurrentVersion Task Sequence variable, which Wally’s script relies on.
REM MAP Z TO DEPLOY SHARE net use z: \\bg\cookcounty /user:bg\mdt REM CHANGE DIRECTORY TO CONTROL FOLDER cd /d z:\control REM RUN ZTIGATHER TO POP OSCURRENTVERSION cscript.exe ..\scripts\ztigather.wsf /debug:true
Note: I run the script from the control folder, so it can locate my “CustomSettings.ini”. This is not required, but a good in practice.
-
Lastly, run the “Action-CleanupBeforeSysprep.wsf” and get a coffee. This script could take an hour to run depending on how defragmented the drive is.
The Deployment Bunny is Mikael Nystrom, not Wally Mead.
good call, my mistake.
also….I don’t think it does any defragging of defragmented drives.
I’ve been using your file ModelMarkBreakdown-2014Apr03.xlsx but some especially cryptic references (while compact) are beyond my understanding. Clarify for me please the use of the *. The note in the “Breakdown of Serial Numbers” indicates it represents the unit number on the production line.
However, the * appears in different locations in the model number, sometimes with two different locations of the *, and with 1-6 place holders. Typically the * is a wildcard indicator and its purpose is to accept all characters after the *.