Jump to content


Siroj

Howto re-run same TS step after reboot? Use SMSTSRetryRequested?

Recommended Posts

My Name is Siroj, i am from Belgium and as of a few weeks i am added to the SCCM team. When assigned with this new task my SCCM knowledge was very basic and atm i am studying to be certified.

 

I'll first try to explain what i want to create here and why.

 

In our organisation we have a lot of (+/- 30) different computer models with a total of around 7000 machines and we need to upgrade all of those BIOSes to the latest version. Sometimes the upgrade needs staging because of earlier version requirements. To make things a bit harder, we want to upgrade inside WinPE to be absolutely sure the BIOS is up-to-date before entering FullOS and continuing the TS because of BIOS requirements of some of the applications that are installed using the same TS.

 

Creating a "normal" TS using groups, WMI queries and nested stuff to install the BIOS upgrades is not manageable due to the sheer amount of upgrades that need to be added. I already found ways to install the upgrades using powershell or VB scripts and that's what i want to accomplish. The only thing that i am having issues with is reboots. Of course BIOS upgrades need the computer to reboot to complete it's task. Using the usual Reboot step within the TS won't work for me, as i want to use a single script to do all the work. Most of the scripts have to be repeated a few times accompanied with a TS reboot but that's not what i want. The script i want to create checks for the current BIOS version, if a newer version is available install that and reboot. After the reboot, rerun the same script using the same TS step and repeat this until no newer version is available. After that BIOS Upgrade step is complete, and the BIOS is upgraded to the latest version or the BIOS was already up-to-date resume the rest of the TS. This way we only have 1 step that does all the BIOS upgrade work for us and this keeps the TS clean and manageable.

 

Of course i did some digging and this is not a standard approach. Creating the script that does all the work is not the problem for me, it's handling the reboots and re-running the same TS step after a reboot. As far as my SCCM knowlegde goes, rerunning the same step is not natively supported but PLEASE correct me if i am wrong!

 

At this moment i am investigating the use of the built-in variable SMSTSRetryRequested and SMSTSRebootRequested as found on technet: http://technet.microsoft.com/en-us/library/hh273375.aspx. It clearly states that;"After the computer is restarted, the task sequence manager will rerun the same task sequence step." This should work when SMSTSRebootRequested also has been set to TRUE. Unfortunately, this doesn't work at all. I wish i could provide you with a log file and show what's happening, but i am at home atm so no logs available. If i recall correctly, the script exit's correctly and both variables are set to TRUE. It then won't restart, but exits in error and the TS halts.

I'll be able to provide more LOG info tomorrow, but if anyone has more info that could assist me in this "quest" that would be great ;))

 

Share this post


Link to post
Share on other sites

Why do you need incremental BIOS updates? It's pretty uncommon that a new BIOS update requires a specific BIOS Version installed.

 

Anyways, i could imagine that Windows PE is the source of the problem. It was not staged yet (done by the restart to PE step) when you started the script. So by triggering the reboot request there is no OS to reboot to available.

To my shame i have to admit that i never used these variables. But i might give it a try in the Lab. It's actually an interesting approach to the multiple system update problem.

Share this post


Link to post
Share on other sites

I can't help it that some of the Dell updates are incremental, but i need to deal with it..
If i can get this approach to work, it keeps my TS very neat and clean and it's very easy to add updates, models and files.

 

I have created a very basic script to simply test this reboot and retry step. I don't know if the 3010 return code is needed, but returncode 0 has the same effect.
To test this script i created a new TS with only this script added. The machine is then booted into PXE and this TS is then selected. What i want is that this script reboots the machine and then repeat this same step.
In this form i essentialy are creating a loop, but it's only for testing purposes. Normaly this would update the machine and reboot, or return without action and complete the TS.

 

Don't know if you want to take a look at the log, but here it is: https://www.dropbox.com/s/3l5eqpxppi7bowy/smsts.log

And the script i am using is the following:

dim env, retval

set env = CreateObject ("Microsoft.SMS.TSEnvironment")

env("SMSTSRetryRequested") = "true"
env("SMSTSRebootRequested") = "true"

Retval=3010

WScript.Quit(Retval)	 

Share this post


Link to post
Share on other sites

Sadly, we DO need to upgrade before we install the OS and the rest of our applications. Some of our custom apps require some specific BIOS stuff and therefore we need to upgrade before installing. Don't know the exact specifics but our application development department said its a requirement.

Therefore I need to make this work and I would really like it to work this way.

You say this doesn't work in WinPE, but how do you know that and what can I do to make this work?

Share this post


Link to post
Share on other sites

Task sequence cannot continue after reboot because TS Manager is not configured to auto-start or GINA is not installed

This error message points out the source of the problem. This should not happen in full OS mode. Just give it a try and move the TS step right behind the "Setup Config Manage Client" step. It's still before the application and package install steps this way, no matter what your application department says. Requirements are a good thing but they shouldn't be a dogma ;-) .

Testing this in a VM takes only 20 minutes.

Even if a certain UMTS driver requires a specific BIOS Version this should be no problem, because UMTS drivers require usually a full setup to install the firmware.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.