Executing an Orchestrator 2016 Runbook via PowerShell and hand over 2 variables

Sven H 46 Reputation points
2021-09-27T06:51:25.19+00:00

Hi,

at the moment, I use the webconsole to execute a runbook. The runbook is using infomations of 2 text(string) fields and the information which portal user is executing the runbook.
I did find an example at hh921685(v=msdn.10)
But It does not work (anymore?). I am using Orchestrator 2016 7.3.327.0.
The example corresponded to 2012.
Does anyone know if it is still working normaly?

I get:
“The remote server returned an error: (400) Bad Request.”
in Line 67
[System.Net.HttpWebResponse] $response = [System.Net.HttpWebResponse] $Request.GetResponse()

greetings

System Center Orchestrator
System Center Orchestrator
A family of System Center products that provide an automation platform for orchestrating and integrating both Microsoft and non-Microsoft IT tools.
219 questions
0 comments No comments
{count} votes

Accepted answer
  1. Stefan Horz 3,466 Reputation points
    2021-09-27T10:40:13.49+00:00

    Hi @Sven H ,

    the code from https://learn.microsoft.com/en-us/previous-versions/system-center/developer/hh921685(v=msdn.10)?redirectedfrom=MSDN should work.
    The GUID of the Runbook and the parametes must be in lower case.

    Does URL the Orchestration Web Console work at your site? (In the example it is http://server01.contoso.com:81/Orchestrator2012/Orchestrator.svc/Jobs with a blank which should not be there).

    Regards,
    Stefan


0 additional answers

Sort by: Most helpful