SCCM 2012 R2 & MDT 2013 – Pausing task sequence

SCCM 2012 R2 & MDT 2013 – Pausing task sequence

Hi All,

have you ever wonder why and how to pause a task sequence??

well…the why is simple, troubleshooting…but how, that is the complicated part…

Actually not, and if you stop a bit and think, there are many ways:
1- create a script to wait many minutes (lets say, 120min), i think this is enough to do any troubleshooting 🙂
2- create a script to look for something (ie. a file) and when the file exist, it deletes and continue…
3- create a script…
4- create a script…

as you can see, everything is down to a script, unfortunately, there is no “out-of-the-box” step to do it…

but now that you know how to pause a TS (ok, you still don’t know how to create a script, do you?) let’s look at the options

1- create a script that waits for 120min…
and if you finish your troubleshooting before?!?!!? you need to wait…not a good one..

2- create a script that look for a file
ok, you finish the troubleshooting and now you need to create a file (ie: x:\continuets.txt) as you’re a MS-DOS genius, you’ll use copy con don’t you?!??!, ok you’ll open the notepad..

why not do something better…ask the person to click “OK” when he/she does not need it anymore…

but there is a problem…and the progress bar?!?! we need to hide it…

well..wait no more because i created a script to do it…
1- call a script…but it is not as simple as calling any vbscript, because we want the user to be able to “click” and this task is not as easy as it looks…
2- create a script (and as per title, you know that I use MDT, but it works without MDT with a few changes)

1- Command line
serviceUI.exe -process:TSProgressUI.exe %SYSTEMROOT%\System32\wscript.exe “%DeployRoot%\Scripts\RFL_PauseTS.wsf”

we’ll be using the serviceUI.exe to call a script and this script will allow us to interact with it. the script is called RFL_PauseTS.wsf and as you can see, it will be located under the script folder of the MDT Package

2- create the script

<job id=”RFL_PauseTS”>
<script language=”VBScript” src=”ZTIUtility.vbs”/>
<script language=”VBScript”>
‘ // ***************************************************************************
‘ //
‘ // Copyright (c) RFL Systems. All rights reserved.
‘ //
‘ // File: RFL_PauseTS.wsf
‘ //
‘ // Version: 1.0
‘ //
‘ // Purpose: Pause Task Sequence
‘ //
‘ // Usage: serviceUI.exe -process:TSProgressUI.exe %SYSTEMROOT%\System32\wscript.exe “%DeployRoot%\Scripts\RFL_PauseTS.wsf”
‘ //
‘ // ***************************************************************************

Option Explicit
on error resume next
Dim oTSProgressUI
set oTSProgressUI = CreateObject(“Microsoft.SMS.TSProgressUI”)
oTSProgressUI.CloseProgressDialog()

‘Popup Message
MsgBox “The task sequence is now paused.” & chr(13) & “To resume the task sequence please click on OK.”, 64,”Task Sequence PAUSED!”
wscript.quit(0)

</script>
</job>

As you can easily see on this script, it will hide the TS Progress bar and will show the following screen
pausets

Easy, once you have finished with your troubleshooting, you only need to click OK….

About

Raphael is a 9 times Microsoft MVP with over 20 years of experience in IT, in which 13 years have been dedicated to System Center and Automation. His extended experience has been developed through several IT roles, from first-line support to principal consultant, towards a wide range of clients and sectors. One of the four MVPs in Enterprise Client Management in the UK, Raphael holds more than 30 Microsoft certifications and is an MCT (Microsoft Certified Trainer). Since 2008, Raphael has been providing Microsoft trainings from basic to advanced levels in several categories. Throughout his career, Raphael has joined as speaker in well-known events such as TechEd and Gartner Security Risk Management. He also organised community events and lectured around the world, sharing best practices and knowledge within the industry. Bilingual in English and Portuguese, Raphael has authored diverse articles published in Microsoft's TechEd, served as the editor-in-chief of a magazine focused on System Center in Brazil and wrote two books: "Understanding System Center 2012 SP1 Configuration Manager: The walkthrough book" and "System Center 2012 R2 Configuration Manager: Automation from Zero to Hero".

Tagged with: , , , , , ,