PowerTip: Publish Data to Orchestrator Data Bus

PowerTip: Publish Data to Orchestrator Data Bus

  • Comments 4
  • Likes

Summary: Publish Windows PowerShell data to the Orchestrator data bus.

Hey, Scripting Guy! Question Can I access data in my Windows PowerShell script from within Orchestrator?

Hey, Scripting Guy! AnswerSelect Published Data in the Run .NET Script activity, click Add, and fill in the details for the object you want to publish:

“Name”              Name you wish to use on the Databus
“Type”                           Type of .NET Object, Date/Time, String or Integer
“Variable Name”             PowerShell Object Name without the “$”

For example:

PowerShell

$UserName=”John Smith”

Orchestrator Published Data option in “Run .NET Script”

Image of menu

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • The hard part, of course, is running your PowerShell script on a remote server in a PowerShell 3.0 window with elevated privileges and then capturing and returning the results to Orchestrator, writing them out to the Event Log and picking them up with SCOM. Then don't look at it until something goes wrong.

  • @Doug

    What you COULD do for that (Just a thought) is add some more traps in the PowerShell script you could monitor with SCOM.    Possibly a Custom Event to indicate "Good thing Happened" and one for "Bad thing" (to over simplify it) within the actual PowerShell script.    You could then have SCOM trap for those events within Windows PowerShell by monitoring the EventLog.

    Letting the car drive itself is really cool, but you're right.  You still need to be able to monitor if things do go bad.

    None of us want to work for "Mr. Murphy" ;)

    Sean

  • @Sean

    I use the good event and bad event combo myself.  SCOM alerts if it doesn't see the good event every x timespan and alerts anytime it finds the bad event.  

    @Doug

    The PSRemoting invoke-command cmdlet can do everything you're looking for.  It's usually, at least for me, a pain to get powershell remoting working with SCORCH but once it works it does most of what you need.  

  • Awesome tip btw, I was trying to figure out exactly how this worked!