Orchestrator - Get Runbook GUIDs using PowerShell

Two simple PowerShell scripts which can be used to retreive Runbooks and Parameters associated GUIDs via the Orchestrator Web Service 

 
 
 
 
 
4.3 Star
(3)
3,582 times
Add to favorites
System Center
1/21/2014
E-mail Twitter del.icio.us Digg Facebook
  • Method Invocation Failed
    1 Posts | Last post April 04, 2018
    • I get the following error, just like Renatoo2014, is there a solution for this? My RB name does not have apostrophes. 
      
      Method invocation failed because [System.String] doesn't contain a method named 'getElementByTagName'.
      At line:1 char:51
      + $RunbookEntries = $runbookxml.getElementsByTagName <<<< ('entry')
          + CategoryInfo          :  InvalidOperation: (getElementsByTagName:String) [], RuntimeException
          + FullyQualifiedErrorId : MethodNotFound
  • GetRunbookGUIDS will fail with powershell 2
    3 Posts | Last post August 21, 2017
    • Hello Denis,
      
      
       I'll get the error below running the script with powershell 2.0. (works well with 3.0)
      
       item : You cannot call a method on a null-valued expression.
       GetRunbookGUIDs.ps1:80 char:86 + $RbkGUID = $RunbookEntry.GetElementsByTagName("content").childNodes.childnodes.item <<<< (0).innerText
      
       -> Error Querying Orchestrator Web Service.
       getElementsByTagName : Method invocation failed because [System.String] doesn't contain a method named 'getElementsByTagName'.
       GetRunbookGUIDs.ps1:90 char:56
       + $ParamEntries = $runbookxmlparam.getElementsByTagName <<<< ('entry')
       + CategoryInfo : InvalidOperation: (getElementsByTagName:String) [], RuntimeException + FullyQualifiedErrorId : MethodNotFound
      
       any idea ?
       thanks a lot
    • Hi,
      
      Did you find a solution, I have the same issue.
      
      Thanks in advance.
      
      Regards,
    • Make sure there is not an apostrophe in the RB name.
  • Include Direction of parameters
    1 Posts | Last post March 06, 2017
    • Great script! Suggestion: Add an extra NoteProperty Direction to output and populate with $ParamEntry.GetElementsByTagName("content").childNodes.childnodes.item(5).innerText for each parameter. We use your script to automate build of scripts to start runbooks and there are a few runbooks here and there that have Out(put) parameters in addition to In(put) parameters