Categories
ConfigMgr

ConfigMgr : WinPE 5 and SCCM 2012 SP1 CU3

Want to deploy Windows 8.1, without upgrading your SCCM environemnt to 2012 R2? This is supported with SCCM 2012 SP1 CU3 – the steps below outline how you can do this.

Download and install the Windows 8.1 ADK: http://www.microsoft.com/en-us/download/details.aspx?id=39982

Create the following folders on the machine you install the ADK on:

  • C:\Temp\WinPEx64\
  • C:\Temp\WinPEMount

Copy C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\en-us\winpe.wim to C:\Temp\WinPEx64.

Modify the script below to create the amd64 boot image, import the required optional components (and drivers):

{code lang:text showtitle:false lines:false hidden:false}:: CD to correct DISM verion (ADK 8.1)

cd “C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM”

:: Mount Image

dism.exe /mount-wim /wimfile:C:\Temp\WinPEx64\winpe.wim /index:1 /mountdir:C:\Temp\WinPEMount

:: Add required components

dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-wmi.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-scripting.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\winpe-wds-tools.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-SecureStartup.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-HTA.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-HTA_en-us.cab”
dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-SecureStartup_en-us.cab” dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WDS-Tools_en-us.cab” dism.exe /image:C:\Temp\WinPEMount /add-package /packagepath:”C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab”

:: Inject Drivers for vmxnet3, Surface Ethernet, Intel i217-LM

dism.exe /image:C:\Temp\WinPEMount /add-driver /driver:C:\Temp\Drivers\Ethernet_dongle\msu64w8.inf
dism.exe /image:C:\Temp\WinPEMount /add-driver /driver:C:\Temp\Drivers\72FNC_A00-00\win7x64\E1d62x64.INF
dism.exe /image:C:\Temp\WinPEMount /add-driver /driver:”C:\Temp\Drivers\vmxnet3-8.3.12 build-493255\vmxnet3ndis6.inf”

:: Commit changes and unmount

dism.exe /unmount-wim /mountdir:C:\Temp\WinPEMount /commit

{/code}

Now import the boot image to SCCM, import using the name “Boot image (x64) [WinPE5 Custom]” – this is important as we’ll use this name again to enable F8 Command Support via PowerShell.

Use the following PowerShell script to enable Command Line support in your Custom WinPE 5 boot image – modified source from http://www.projectleadership.net/blogs_details.php?id=3169. Change the Site Server, Site Code, and if necessray the Boot Image name you used earlier during the import process.

{code lang:text showtitle:false lines:false hidden:false}Clear-Host;
$SccmServer = “<site server FQDN>”;
$SiteCode = “<Site Code>”;

# Retrieve a list of all boot images that do not have command support enabled.
$BootImageList = Get-WmiObject -ComputerName $SccmServer -Namespace root\sms\site_$SiteCode -Class SMS_BootImagePackage;# -Filter “EnableLabShell <> ‘True’”;
$BootImageClass = [wmiclass]“\\$SccmServer\root\sms\site_$SiteCode`:SMS_BootImagePackage”;

foreach ($BootImage in $BootImageList) {
        # Retrieve instance directly, to include lazy properties
        $BootImage = [wmi]$BootImage.__PATH;
        if ($BootImage.Name -eq “Boot image (x64) [WinPE5 Custom]” -and $BootImage.EnableLabShell -ne “true”) {
            try {
                 $BootImage.EnableLabShell = ‘True’;
                 [void]$BootImage.Put();
                 $BootImage.RefreshPkgSource();
                 Write-Host -Object (’Enabled command support testing on package: {0}, {1} {2}’ -f $BootImage.PackageID, $BootImage.Name, $BootImage.Version);
                 }
            catch {
                 Write-Warning -Message (’Failed to enable command support testing on package: {0}, {1} {2}’ -f $BootImage.PackageID, $BootImage.Name, $BootImage.Version);
                 }
            }
    }{/code}

Distribute the Boot Image, and enable “Deploy this boot image from the PXE-enabled Distribution Point.”

Next create a USMT package in SCCM from files located under: C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\User State Migration Tool.

Ensure that you use the new boot image, and USMT package in any Windows 8.1/2012 R2 Task Sequences.

Leave a Reply

Your email address will not be published. Required fields are marked *