Clean-up Before Sysprep And Capture To Reduce The WIM File Size

By | February 21, 2018

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.

  1. Jump to Wally’s github and save the script you’re your MDT Deployment Share’s script folder:

  2. 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.


    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.

  3. 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.

Running a PXE Server in Windows 10 in less than 10 minutes

By | February 16, 2018

Download the “Portable” version of the Tftpd32 software.

All of my source files:

My TFTPROOT folder contents and source

Files were pulled from Windows 10 ADK installation.

C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\Media =>

..Media\EFI\Microsoft\Boot\BCD => TFTPROOT\Boot\BCD
..Media\EFI\Microsoft\Boot\boot.sdi => TFTPROOT\Boot\bood.sdi

Opened “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim” with 7-zip and copied and renamed the following file:

TFTPROOT\pxeboot.n12 => \pxeboot.0

Copied “C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim” and renamed to “boot.wim”

winpe.wim => TFTPROOT\sources\boot.wim

Download the latest from

Extracted with 7zip, searched and copied out the following files to the TFTPROOT folder:


Lastly, I created a “default” file in a”pxelinux.cfg” folder with the following content:

Dynamically assign MDT’s DeployRoot rule based on IPAddress001’s 2nd or 3rd octet.

By | May 26, 2017

No DefaultGateway = No Problemo…

Oracle VirtalBox‘s built-in DHCP server does not pass a DefaultGateway to clients. This introduced a challenge when attempting to dynamically assign a “DeployRoot” in MDT’s BootStrap.ini rules file. The standard process relies on using the DefaultGateway variable (i.e.

To work around this limitation, I found a quick and easy way to use either the 2nd or 3rd octet of the client IP (IPAddress001) to dynamically assign the DeployRoot.

Here is my BootStrap.ini:


Priority=Default, SecondIpOctet, ThirdIpOctet

Properties=SecondIpOctet, ThirdIpOctet













With this configuration, additional section breakouts can be added for either the IP’s 2nd or 3rd octet.

Here is a screenshot of the ZTIGather.wsf log output:

ð Don’t forget that a Deployment Share update is required for this change to become active.

Tweaks to help using Litetouch OEM For All Media Deployments

By | April 4, 2017
Update 2017.04.07 -> Added instruction to remove conditions on ComputerName wizard pane to force it to appear regardless of TS selected.


  • No more do you need to worry about the Deployed OS detecting the flash drive.


  • Some editing of built-in scripts is required.
  • Deployments take slightly longer, because share is copied local before beginning.


  1. Edit the Litetouch.wsf to perform a reboot instead of a shutdown upon completion of staging the deployment share. (~ lines 997-1006)
  2. Add the LTIEnableDeployTs.wsf to the scripts folder. The script relies on the DS only containing one deploy task sequence with an ID beginning with a “DEP” (i.e. DEP-10X64-001).
  3. Lastly, Move the computer name prompt to the appear first, even before the task sequence selection is presented.  Also remove any/all “Condition” xml blocks. This is to work-around the pane not appearing, when a litetouch task sequence is specified.

Other notes:

  • The SkipFinalSummary rule cannot be set to YES. The “Reboot prompt when the staging is complete.”
  • The SkipTaskSequence rule cannot be set to YES. This breaks the LTIOem built-in script. However, The TaskSequenceID rule can be set to preselect a TS.


Copy an MDT Deployment Share to a USB without building a Media Share

By | March 27, 2017

*Updated to support both x86/x64 boot wims.

This script copies an MDT Deployment Share to a USB drive and basically converts it to a media share in the process.  You must edit and update the “DrvLetter” variable. Please the batch file beside the “Deploy” folder.