Run Scripts: Trigger Task Sequence

Goal: Trigger Task Sequence remotely via Run Script. Allows you to trigger on one computer or several. *The Policy for the Task Sequence most already be on this machine.

Choose a Collection / Computer and Run Script

Type the Package ID for the Task Sequence you want to trigger on the machines:

You can Hover over for more info:

This machine doesn't have that TS Package ID available to Trigger - Results return quickly
This machine Triggered, and has successful confirmation of the TS starting in the execmgr.log
This one triggered, but the TS could not start because of a MW
This machine Triggered, but failed to register that it started the TS in execmgr

The Return information is LIMITED to a couple scenarios I check for.
Process:

  • Check for Task Sequence on Machine with Package ID
  • Trigger Task Sequence
  • Wait 2 Minutes
  • Check ExecMgr Log for:
    • Successful launch of TS with Package ID
    • Waiting for MW
  • If neither of those options are found in the log, it Reports "Failure"**
    • This can be a false positive... Example... If you have the TS set to download content before starting, it could still be downloading the required content after you triggered it... so eventually the TS might still kick off after the content has downloaded.

For more details you'll need to dig through the execmgr and other logs.

Now... the script:

Let me know if you use it and how it goes... GARYTOWN.COM
PS... special shout out to Jeff Scripter for the Function I use to parse the execmgr log.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.