Deploying hotfixes during SCCM Task Sequence

It’s been a while since we built our initial Windows 10 image, and it’s fallen quite a bit behind the times. We didn’t want to spend time updating the image until we were ready to go in to production, and WSUS seemed to have issues installing some of the updates, resulting in systems that wouldn’t update properly unless manual update packages were installed.

To fix this I deployed a package to the task sequence containing this script:

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$folder = $scriptPath
$total = gci $folder *.msu | measure | Select-Object -expand Count
$i = 0
gci $folder *.msu | foreach {
$i++
WUSA ""$_.FullName /quiet /norestart""
Write-Progress -activity "Installerer hotfixes" -status "Installerer $_ .. $i af $total" -percentComplete (($i / $total) * 100)
Wait-Process -name wusa
}

Credit to this fella for the source: http://www.applepie.se/apply-hotfixes-during-task-sequence

Essentially this will run within the package directory, installing all .msu’s found within. Currently it’s just throwing on kb3213522 – which enables WSUS to take over from there, but it could potentially save people who don’t have WSUS some serious hassle.

Add the package to task sequence and point it at the powershell script and you’re golden. Modify the text displayed within ” ” to your liking.

One thought on “Deploying hotfixes during SCCM Task Sequence

Leave a Reply

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