Automate vRealize Orchestrator with PowerShell: Introducing PowervRO

For the PowerCLI book 2nd Edition I helped put together a chapter on vRealize Orchestrator. Most of the chapter was focused on running PowerShell scripts from vRO, which was something I’d had a fair bit of experience with in projects I had been on and also thought would be what most people reading would be interested in. At the end of the chapter I added a few functions using the vRO REST API to run things in vRO from PowerShell as a bit of an after-thought.

Querying vRO Workflows with the REST API and Multiple Conditions

Querying vRO workflows using the vRO REST API is relatively straightforward task. Use the below URL with a GET request and specify a condition to search for them, e.g. to find one by it’s name use: https://vroserver.domain.local:8281/vco/api/workflows?conditions=name=test01 You should get a response similar to the following if a workflow of that name exists: [javascript] { “link”: [ { “attributes”: [ { “value”: “https://vroserver.domain.local:8281/vco/api/workflows/cb9264b1-c832-4ee3-b95a-db73f7a2fedf/", “name”: “itemHref” }, { “value”: “cb9264b1-c832-4ee3-b95a-db73f7a2fedf”, “name”: “id” }, { “value”: “Test”, “name”: “categoryName” }, { “value”: “true”, “name”: “canExecute” }, { “value”: “https://vroserver.

Publish IaaS Blueprint in vRO via the vRA REST API

There is an excellent post over at which details how to create a vRA IaaS Blueprint from vRO. Once you have used the workflow from that site to create a Blueprint it still needs to be published before it can be used as a vRA Catalog Item, added to a Service etc. Note that even updating Christiaan Roeleveld’s code to set the property IsPublished to true, doesn’t actually publish the Blueprint.

Use Headers in a vCO REST Operation

vCenter Orchestrator has a built -in plugin for working with systems that support REST API queries. I’ve used this fairly extensively recently while working with vCNS Out of the box the plugin will do the majority of the hard work for you, however one thing that isn’t available via the Add a REST operation dialogue is the ability to configure a custom header for the REST query. In the following example I need to add an if-match header to update the App firewall rules for a portgroup, but for a POST method I only have the option to specify the Content type:

vShield 5.5 API Programming Guide - Corrections

It’s pretty disappointing to need to do this, but recently while working with vCNS / vShield 5.5 and automating it via the REST API I have been making extensive use of the vShield 5.5 API Programming Guide. On the whole its a decent document with lots of useful examples, without which I would have been struggling. However, there are numerous mistakes in it, particularly around the URLs required for various API calls.