Jump to content


  • 0
craigster

outputting task sequence variables from a runbook

Question

I managed to get this working but, as I've just started using Orchestrator, I wanted to see if a better solution could be found to a problem I encountered.

Basically, I wanted to automate the removal of PCs from SCCM and AD before they are re-imaged as currently some technicians don't have permissions to remove these objects. To this end, I came up with the idea of having a runbook which would check to see if the machine was already found in either place, this would then set TS variables which would display this information in an HTA. The user could then choose to remove or keep the machine, and this would be picked up by a second runbook which actually removed the objects.

Now, I know that the first runbook isn't strictly required. But as a learning exercise I wanted to get it working. What I found was that I had to run two scripts which queried ad & SCCM separately and return true or false and return these via one return data activity. Returning these back to the TS was the tricky bit. No matter how I did it, going by the ZTIExectuteRunbook log, it would seem that the two variables were returned more than once. So you would get the correct values returned, but also it would right them back blank. Depending on which variable was returned last would determine if the correct result was picked up by the HTA.

To me what was happening is that the two scripts were finishing at different times, which caused the return data to be activated more than once. As each script only wrote one variable at a time, the other was left blank. I ended up splitting both into two different runbooks and calling them from a parent runbook.

My question is, is there a simpler solution to this?

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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.