Pausing an SCCM Task Sequence, a bit different.

That’s the first entry on my just newly created blog. Nothing fancy yet, more to come I hope.
And yes, I’m aware that there are countless postings on how to pause a task sequence.

I actually used one of those for my variation.
(Credits to the original author: http://www.windows-noob.com/forums/index.php?/topic/8846-how-can-i-pause-a-task-sequence-in-system-center-2012-configuration-manager/)

The difference is that while troubleshooting a Task Sequence, it may have quite a few breakpoints and not being able to figure out where it paused bothered me. Hence this improved version.

What does it do?

Instead of just opening a text box, saying like “pause, press ok to continue”, it displays the step name instead, informing at which point in the task sequence it stopped.
Additionally any variable available to the Task Sequence can be shown.

An example. Assume this is the Task Sequence Name;


(“! PAUSE” is added to make finding them easier in a (long) task sequence)

results in:

Requirements:

  • MDT
    It may actually work without it, but I didn’t try as I don’t see a point of not having MDT integrated with SCCM. It is so useful and base functionality is easy to learn.
  • A small VB-script.
    It’s small, I just add it here. Save this to a *.vbs file. Naturally the one you want to use for the command line, like “pause_ts.vbs”

    Set TsProgressUI = CreateObject(“Microsoft.SMS.TsProgressUI”)
    TsProgressUI.CloseProgressDialog
    for i = 0 to wscript.arguments.count – 1
        step = step & wscript.arguments(i) & ” “
    next
    MsgBox “Step: ” & step + chr(13) + chr(13) & “To resume the task sequence please click on OK.”, 64,”Task Sequence PAUSED!”
    wscript.quit(0)

  • The servceUI.exe from MDT
    located here:
    <MDT-Install-Folder>\Templates\Distribution\Tools\<CPU-Architecture>

    For (automatic) x86 and x64 support, copy them both and rename them to (saves using scripts or if’s):

    • serviceUI_AMD64.exe
    • serviceUI_x86.exe
  • Put the script and the exe(s) in a package and distribute.
    No program required.
  • The Task Sequence Step
    Provide the Name (text) you want to be displayed, e.g.
    • “! PAUSE _SMSTSMachineName=%_SMSTSMachineName%”
      Or
    • “Pausing before my fancy custom action”
      Enter the command  line:
    • serviceUI_%PROCESSOR_ARCHITECTURE%.exe process:TSProgressUI.exe %SYSTEMROOT%\System32\wscript.exe pause_ts.vbs ‘%_SMSTSCurrentActionName%’
    • Select the package you’ve created

Example:


“That’s awesome, but I want to display a zillion variables at the same time and it doesn’t fit in the name field”

While you can add all kind of variables into the step name, you’re limited by the max. length for a step name: 50 chars.
If that isn’t enough, use the command line directly or a mix, to extend:

serviceUI_%PROCESSOR_ARCHITECTURE%.exe -process:TSProgressUI.exe %SYSTEMROOT%\System32\wscript.exe pause_ts.vbs ‘%_SMSTSCurrentActionName% COMPUTERNAME=%COMPUTERNAME%’


“How can I suppress those messages without deleting them?”

The simplest method is to check against a Task Sequence Variable such as “Debug equals true”.

Either enable/disable directly in the task sequence at the beginning for all or use collection/machine variables to control them more specifically.

Feedback welcome

5 thoughts on “Pausing an SCCM Task Sequence, a bit different.

  1. Rolland, I have created a build capture task sequence and would like to you this to patch and make a few regedit mods. Where would you suggest that I place this task sequence? After OS install?

    • Hi,

      While you can, I wouldn’t recommend doing that in B&C.
      B&C task sequences should contain rather static and large content or content taking a long time to install, like Office, .Net, Patches.
      It is not suitable for things which rather should go in OSD itself. You loose all the flexibility if that is baked into a wim and gain almost no time.
      Also while in B&C you’re usually in a workgroup, hence many things may either not work or are not useful.

      Instead use the deployment task sequence and then within post install.

      cheers, roland

  2. Pingback: Mettre une Task Sequence en pause à la volée avec juste une variable - Partageons notre savoir-faire

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s