For a while Craig and I have had a number of requests regarding offering OS X and Linux support to PowervRA, particularly since in case you weren’t aware PowerShell is now available on those OSs and 3rd party modules such as PowerCLI are heading towards supporting that. We first looked at offering this support for PowervRA when the first Alpha release of PowerShell Core was shipped, however we were blocked by a couple of issues, particularly this one regarding certificate checking.
However, back in December I read about how the guys who maintain PowerNSX had been able to offer PowerShell Core support and they had also been blocked by that same issue which has now been resolved. So we updated to PowerShell Core Alpha 14 and started testing again – it seemed that another blocking issue around JSON responses had also been resolved, so things were looking good.
As it turned out, there weren’t a significantly large amount of changes which actually needed to be made on our side – some changes to the Connect-vRAServer and Invoke-vRARestMethod functions to do different things depending on whether PowerShell Core is being used. The scale of community feedback to the alpha releases of PowerShell Core and the efforts of the PowerShell team at Microsoft look like they have had a great impact and covered off a lot of the issues we might have had and the feedback has been quickly taken into subsequent alpha releases.
We benefited from the fact that we have previously invested quality time in producing integration tests for PowervRA, consequently we were able to run the same tests using a PowerShell Core client and only ended up with a couple of bugs that we are currently unable to resolve (here and here) , but looks like at least one of them is scheduled to be fixed for us via a milestone of PowerShell Core beta.
So in release 2.0.0 of PowervRA we are very pleased to bring you support for PowerShell Core!
You will need:
PowerShell Core Alpha 14 + ….instructions on getting it installed for different OS flavours can be found here.
PowervRA 2.0.0 + . Get a copy of PowervRA onto the Linux or OS X 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:
Here’s PowervRA on my Macbook:
Connect to vRA
Retrieve Blueprint Details
Update a Reservation Policy
Here’s PowervRA on Ubuntu 16.04:
Connect to vRA
Retrieve Business Group Details
Update a Network Profile
Craig has done some cool work to make PowervRA available via Docker. Check out his blog post for more details.
Also, many thanks to Alan Renouf for suggesting PowervRA now be made available hosted in the PowerCLI Core Docker Hub too.
In PowervRA 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 Part 1: 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. This was a way I had historically put my modules together, but now have spent some time improving on it to a better way.
- Module Restructure Part 2: a number of functions had been marked in recent releases as deprecated, they have now been removed.
- Module Restructure Part 3: we had previously started moving the functions into folders based on their API endpoint, this is now complete across all of the functions:
We believe we have covered off most issues with using PowervRA on PowerShell Core via our testing process, but if you do experience anything we have missed then please let us know here.
We are aware of one issue with running PowervRA on CentOS, which appears to be something not just relevant for us and should get fixed upstream in .Net Core.
We’re really pleased to be able to bring this support to PowervRA and much kudos to the PowerShell team and the wider community for making it both possible and relatively straightforward. We hope you find it useful given we know a significant part of our potentially user base are OS X users.
Also stay tuned because we are not stopping there. There is other planned new PowervRA functionality on the horizon ……