Q: Do you have any examples of Windows PowerShell scripts to generate a list of Orchestrator Runbooks that then allow a Runbook to be executed, including prompting for necessary parameters?
A: I had this very requirement for a PowerShell course. Below is the full code, which initially generates a list of Runbooks available, then in a Gridview, allows one or more to be selected.
After you click OK, it will prompt for the required parameters and run each runbook selected. I hope it's useful to you.
Change the first $baseurl to the URL of your Orchestrator web service. You can download what you need from my Savilltech website.
The first part of the code fetches all runbooks and stores information in a hash table so it can be outputted to a Gridview. After you select one or more, and you click OK for each selected runbook, it fetches the parameters for the runbook, then prompts for the values, then triggers the runbook giving.