Building Windows 10 Boot media for SCCM 2012 R2

Once you have your SP1 and your CU1, and your ADK and maybe your MDT, you’re probably sick of acronyms and just want to get things done.

Here’s a script that preps your ADK boot media for importing into SCCM. It’s a bit prettier than what’s on the Technet blogs, although I wish I had time to just convert it into PowerShell.


REM This script prepares boot media to be imported into SCCM
REM Only the first three SET commands should need to be customized

REM The source used during the “Add Boot Image” wizard in the admin console
SET SCCMContent=E:\Software\Operating Systems\Boot Media
REM The install path for the Windows 10 ADK
SET ADKSource=C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment
REM The staging folder where the boot wim is built/mounted
SET StagingDir=E:\Boot Media

SET Arch=x86
CALL :Build

SET Arch=amd64
CALL :Build


ECHO Creating %Arch% package…

SET WorkingDir=E:\Boot Media\%Arch%
SET Source=%ADKSource%\%Arch%
SET Destination=E:\Software\Operating Systems\Boot Media\%Arch%

MKDIR “%WorkingDir%\Mount” 2>NUL
MKDIR “%Destination%” 2>NUL

COPY /Y “%Source%\en-us\winpe.wim” “%WorkingDir%\boot.wim”

dism.exe /mount-wim /wimfile:”%WorkingDir%\boot.wim” /index:1 /mountdir:”%WorkingDir%\mount”
dism.exe /image:”%WorkingDir%\mount” /add-package /packagepath:”%Source%\WinPE_OCs\winpe-wmi.cab”
dism.exe /image:”%WorkingDir%\mount” /add-package /packagepath:”%Source%\WinPE_OCs\winpe-scripting.cab”
dism.exe /image:”%WorkingDir%\mount” /add-package /packagepath:”%Source%\WinPE_OCs\winpe-wds-tools.cab”
dism.exe /unmount-wim /mountdir:”%WorkingDir%\mount” /commit
COPY /Y “%WorkingDir%\boot.wim” “%Destination%”


Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment