Tag Archives: macOS

PowervRO – Now available on macOS and Linux via PowerShell Core!

Back Story

Back in January 2017  Craig and I made PowervRA available for macOS and Linux via PowerShell Core. It was always our intention to do the same thing for PowervRO and , although slightly later than we hoped, we’re finally able to do that. PowerShell Core has come a long way itself over the last year, currently in Release Candidate and soon to be GA, and I’m sure a lot of the hard work and community feedback which has gone into that has helped make the job of PowervRO supporting PowerShell Core very straightforward.

In reality we had to make only a relatively small amount of changes to the code base, mostly around detecting which version of PowerShell is being used and consequently which method to use for making API calls to the vRO appliance when dealing with things like SSL certificates and protocols. There are a lot of great new things available in Invoke-RestMethod and Invoke-WebRequest in PowerShell Core which make API calls a lot simpler, so we take advantage of those.

Note: to take advantage of a lot of these new features we have raised the PowerShell version requirements for PowervRO 2.0.0 to be Windows PowerShell 5.1 and PowerShell Core 6.0.0-rc

Having invested a lot of time with the initial release of PowervRO in creating integration tests via Pester for each function, that really paid off for this release since we were very easily able to test everything against different versions of vRO with different versions of PowerShell across different operating systems. Again very little actually needed to be changed in the code for the functions themselves, which is a testament to the compatibility of PowerShell Core. Typically it was only things like cmdlet parameter changes, such as this one, which tripped us up.

Requirements

You will need:

PowerShell Core Release Candidate + ….instructions on getting it installed for different OS flavours can be found here.

PowervRO 2.0.0 + . Get a copy of PowervRO onto the Linux  or macOS machine you want to run it from. Use the following to download it  from the PowerShell Gallery:

or manually copy the module yourself to one of the locations listed in $env:PSModulePath, for example:

In Action

macOS

Here’s PowervRO on my Macbook:

Connect to vRO:

Retrieve all Workflows, sort by CategoryName and display Name, CategoryName and Version:

Invoke a Workflow:

 

CentOS 7.3

Here’s PowervRO on CentOS 7.3:

 

Connect to vRO:

Retrieve all Workflows, sort by CategoryName and display Name, CategoryName and Version:

Create a new Category:

 

Ubuntu 17.04

Here’s PowervRO on Ubuntu 17.04:

Connect to vRO:

Retrieve all Workflows, sort by CategoryName and display Name, CategoryName and Version:

Remove a Category:


Side Note

In PowervRO 2.0.0 we have also made some under the hood changes that it is worth being aware of (check the changelog for more details):

  • Module Restructure: we changed the functions from being their own individual nested modules in *.psm1 files to more simply being in *.ps1 files and made part of the module in a different way. The build process for a release now combines all of the functions in the individual *.ps1 files to a single *.psm1 module file.
  • The Password Parameter of Connect-vRAServer now requires a SecureString, not a String. Consequently, you will now need to supply a SecureString when using it like the example below: