PowerShell Script to detect ConfigMgr Task Sequence unfriendly Software Updates

Update: 15 Une 2014 – Added KB2965788

If you’re dealing with ConfigMgr and OS Deployment task sequences you’re probably aware of the KB article recently published by Microsoft called “Task sequence fails in Configuration Manager if software updates require multiple restarts”.

Let’s hope the list of KBs causing this issue isn’t going to grow too much over time, in any case we’ve decided that we would continue to review the article whenever we add new patches to our infrastructure. To simplify the task of checking whether one of the affected KBs has slipped into a software update group, I created the below script.

The script published below, contains all KB numbers stored in the $KB variable. I recommend that you update the variable within the script as the online article gets updated with additional KB numbers. If you prefer to just check for one particular KB number, you can run the script using the –KB parameter.

One thought on “PowerShell Script to detect ConfigMgr Task Sequence unfriendly Software Updates

  1. When I run the script I get the following error:

    At line:7 char:9
    + If you run the script without any parameters, all KB numbers defined in va …
    + ~
    Missing ‘(‘ after ‘If’ in if statement.
    At line:19 char:1
    + [CmdletBinding()]
    + ~~~~~~~~~~~~~~~~~
    Unexpected attribute ‘CmdletBinding’.
    At line:22 char:1
    + param(
    + ~~~~~
    Unexpected token ‘param’ in expression or statement.
    + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement

    Would appreciate some help.

Leave a Reply

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