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

By | February 21, 2018
Share

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: https://raw.githubusercontent.com/DeploymentBunny/Files/master/Tools/Action-CleanupBeforeSysprep/Action-CleanupBeforeSysprep.wsf

  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
Share

Download the “Portable” version of the Tftpd32 software.

http://tftpd32.jounin.net/

All of my source files: https://drive.google.com/open?id=1FAIPPtIogFOk_uklAS_D7YxLrxI36Hly

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 =>

TFTPROOT\bootmgr.exe
TFTPROOT\Boot\en-us\bootmgr.exe.mui
TFTPROOT\Boot\en-us\memtest.exe.mui
TFTPROOT\Boot\Fonts\*.*
TFTPROOT\Boot\Resources\bootres.dll
..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 syslixuxXX.zip from https://www.kernel.org/pub/linux/utils/boot/syslinux/

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

TFTPROOT\ldlinux.c32
TFTPROOT\libcom32.c32
TFTPROOT\libutil.c32
TFTPROOT\memdisk
TFTPROOT\menu.c32
TFTPROOT\pxelinux.0
TFTPROOT\vesamenu.c32

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
Share

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. https://deploymentbunny.com/2012/04/21/back-to-basic-customsettings-ini-explained/).

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:

[Settings]

Priority=Default, SecondIpOctet, ThirdIpOctet

Properties=SecondIpOctet, ThirdIpOctet

 

[Default]

SkipBDDWelcome=YES

SecondIpOctet=SecondIpOctet-#Split(“%IPAddress001%”,”.”)(1)#

ThirdIpOctet=ThirdIpOctet-#Split(“%IPAddress001%”,”.”)(2)#

 

[ThirdIpOctet-56]

DeployRoot=\\192.168.56.1\aio

UserId=mdt

UserPassword=*******

UserDomain=bg

 

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
Share
Update 2017.04.07 -> Added instruction to remove conditions on ComputerName wizard pane to force it to appear regardless of TS selected.

Advantages:

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

Dis-Advantages:

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

Steps:

  1. Edit the Litetouch.wsf to perform a reboot instead of a shutdown upon completion of staging the deployment share. (~ lines 997-1006)
    https://github.com/brianfgonzalez/Scripts/blob/master/LiteTouchOemReboot.wsf
  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).
    https://github.com/brianfgonzalez/Scripts/blob/master/LTIEnableDeployTs.wsf
  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.

/BG

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

By | March 27, 2017
Share

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

/BG