Windows 10 with SCCM 2012 R2 (non SP1)

Need to deploy Windows 10 but don’t have the latest Service Pack installed with SCCM? No problem!

Before Windows 10 was released, we were one of many organizations testing Windows 10 within our production environment. With the preview of build 10049, the SCCM Client no longer worked! Looking at the ccmsetup logs an error was indicated when attempted to install the Windows Update Agent. I discovered a solution posted by Jorgen Nilsson (@ccmexec) who simply mentioned to skip this pre-requisite when launching ccmexec.

ccmexec.exe /mp:MyMP.Domain.com /skipprereq:windowsupdateagent30-x64.exe

And Voila! now you can get a client installed. However, as the OSD guy at my company, I was wanting to use OSD to deploy the OS with the full client and not have to worry about failures or any other issues with the Client during the OSD Process. Depending on you deployment scenario (In-Place Upgrade, Bare Metal, Build and Capture) you’ll need to do something slightly different!

Now, if you’ve upgraded to SCCM 2012 R2 SP1 (or SCCM 2012 SP2) this logic is already built-in. Crack open the ccmsetup.cab that’s with your SCCM Client Source Media. Inside is a xml file. Open it up.

SCCM 2012 R2 CU4:

<Item FileHash="D500A5B5945FAFC6A52FB54B7169B62C6C1137E1694184FF2EFF790AA1394ECE" FileName="x64/WindowsUpdateAgent30-x64.exe">
   <Applicability OS="ALL" Platform="X64">
      <Skip>Embedded</Skip>
      <Skip>OS=>=6.1</Skip>
   </Applicability>
   <Discovery Identifier="%windir%\system32\wuapi.dll" Type="File">
      <Property Operator=">=" Name="Version">7.4.7600.226</Property>
   </Discovery>
   <Installation OptionalParams="/quiet /norestart" InstallationType="EXE" Order="3"/>
</Item>

Now if we take a look at SCCM 2012 R2 SP1:

<Item FileHash="D500A5B5945FAFC6A52FB54B7169B62C6C1137E1694184FF2EFF790AA1394ECE" FileName="x64/WindowsUpdateAgent30-x64.exe">
   <Applicability OS="<10" Platform="X64">
      <Skip>Embedded</Skip>
      <Skip>OS=>=6.1</Skip>
   </Applicability>
   <Discovery Identifier="%windir%\system32\wuapi.dll" Type="File">
      <Property Operator=">=" Name="Version">7.4.7600.226</Property>
   </Discovery>
   <Installation OptionalParams="/quiet /norestart" InstallationType="EXE" Order="3"/>
</Item>

Difference being the Applicability tag which with the Service Pack installed (and Microsoft support for Windows 10) we see that the WUAgent is skipped all together, so, skipping it really doesn’t hurt you at all as far as the client goes.

Obviously though, you SHOULD be making plans to get this Service Pack installed, that way you can avoid these workarounds and have full support from Microsoft when deploying!

Build and Capture or Bare Metal

Armed with the information above, for a Task Sequence where you’re not running setup.exe (Build and Capture/Bare Metal/Hardlink) all you need is to add the “/skipprereq” line from above with your “Setup Windows and Config Manager”:

Installation properties: /skipprereq:windowsupdateagent30-x64.exe

SetupWinAndConfigMgr

In-Place Upgrade

This is a bit different since the In-Place Upgrade scenario doesn’t use the Setup Windows and Config Manager Step, however, the same fix applies.

Download the Upgrade Task Sequence found in this TechNet blog by Aaron Czechowski. When you import this into SCCM 2012, a few packages are created, on of which is called “Windows vNext Upgrade Scripts”. If you try to run the Upgrade Windows Task Sequence on a non-service pack SCCM install, you’ll see Windows Setup sit at 100% for a VERY long time, and then potentially rollback or fail out all together. If you look at the logs you’ll see errors pointing at the Windows Update Agent.

Make a copy of this directory and create yourself a revised “Windows vNext Upgrade Scripts”; this way when you do get the Service Pack installed (And you should soon!) you’re just flipping a package reference! The Upgrade Scripts are referenced by Windows Setup.exe. Look at the “Upgrade Windows” Step of this task sequence

Setup.exe /Auto:Upgrade /Quiet /NoReboot /DynamicUpdate Disable /PostOobe %SystemDrive%\_vNextUpgrade /PostRollback %SystemDrive%\_vNextUpgrade

What’s happening is when you specify the /PostOobe flag, its looking for a file “SetupComplete.cmd”; same logic applies for /PostRollback, which is looking for SetupRollback.cmd. (Feel free to have fun with that information!)

Now, cracking open SetupComplete.cmd, its essentially launching the powershell script SetupComplete.ps1. Edit SetupComplete.ps1 and look for this line:

$process = Start-Process $env:WinDir\ccmsetup\ccmsetup.exe -ArgumentList "/remediate:client" -Wait -NoNewWindow -PassThru

Modify it by injecting the skipprereq from above and you get this:

$process = Start-Process $env:WinDir\ccmsetup\ccmsetup.exe -ArgumentList "/remediate:client /skipprereq:windowsupdateagent30-x64.exe" -Wait -NoNewWindow -PassThru

Beautiful right? Well, almost. If you’ll be using this same package for 32-bit machines, you’ll need to exclude the x86 WUAgent, not the x64 one. Quick WMI call and you’re there:

if ((Get-WmiObject Win32_OperatingSystem).OsArchitecture -eq "64-bit")
{
   $process = Start-Process $env:WinDir\ccmsetup\ccmsetup.exe -ArgumentList "/remediate:client /skipprereq:windowsupdateagent30-x64.exe" -Wait -NoNewWindow -PassThru
}
else 
{
   $process = Start-Process $env:WinDir\ccmsetup\ccmsetup.exe -ArgumentList "/remediate:client /skipprereq:windowsupdateagent30-x86.exe" -Wait -NoNewWindow -PassThru
}

Quick fix to help you get Windows 10 deployed while waiting for that Service-Pack to finally be installed!

 

Enjoi!

Advertisements

4 thoughts on “Windows 10 with SCCM 2012 R2 (non SP1)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s