Native PowerCLI Modules for VMware Cloud Foundation
The Birth of PowerVCF
Back in January 2020 my friend and colleague Brian OConnell embarked on a community project to write a PowerShell module to make consumption of the VMware Cloud Foundation APIs simple and easy to consume by VI Admins, each cmdlet was hand-built using standard PowerShell verbs that the community is well versed in consuming. He saw that the need for automation within our customer based was growing and at the time there was no alternative solution available.
PowerVCF Accelerated Development
Towards the end of 2020 whilst working on VMware Validated Solutions I found the need to heavily consume VMware Cloud Foundations API so I started to look at PowerVCF, initially the API coverage was not great so after chatting with Brian to see where he wanted to take the module I join in his quest to expand the coverage.
Current State of PowerVCF
The latest release of PowerVCF (v2.4.1 at the time of writing) has significant coverage of the VMware Cloud Foundation APIs, its not however 100% and that is mainly due to our own work and personal time constraints but after 4 years of development it supports VMware Cloud Foundation 3.x up to 5.x with no major updates or pending community requests outstanding. Its also now part of an official VMware by Broadcom GitHub repository and with nearly 3000k downloads since its initial release so its usage by the community is pretty large.
PowerCLI Buy-In for VMWare Cloud Foundation
Probably around 3 years ago, Brian and myself engaged with Product Management with a view to moving PowerVCF from a community based project to an official module within PowerCLI, at the time those discussion were very positive but with one major issue which really came down to engineering resourcing. Traditionally PowerCLI cmdlets have been hand-built also following the standard PowerShell verbs but this requires engineering buy-in and of course developers to own and deliver on the asks. At the time there was no way this would happen as engineering were dealing with other more critical issues.
PowerCLI Engineering Strategy
The challenge of adding support to PowerCLI for many of the other products within the VMware by Broadcom ecosystem was starting to create a problem for our customers and there have been many community projects over the years like PowerVCF such as PowerVRA and PowerNSX to name a few which looked to solve the coverage gap PowerCLI had. This is when the PowerCLI team came up with a new approach to exposing product APIs within PowerCLI, this simply involves taking the Swagger OpenAPI spec of the product and using that to generate a bunch of cmdlets for the module. The main advantages of this are significantly lower engineering cost and most importantly 100% coverage of the public APIs.
Introducing PowerCLI Module for VMware Cloud Foundation
With the new approach of auto-generated cmdlets the release of PowerCLI 13.2.0 on November 8 2023 saw the introduction of two new modules to support VMware Cloud Foundation:
- VMware.Sdk.Vcf.CloudBuilder
- VMware.Sdk.Vcf.SddcManager
With the release of these two new dedicated PowerCLI modules we now have native coverage within PowerCLI and more importantly 100% coverage of the available Public APIs. There are however a few drawbacks in my view which I will share:
- The age old rule of rubbish in rubbish out, having spent the last few years hand building cmdlets for PowerVCF and PowerValidatedSolutions I've seen first hand that if the API swagger spec or documentation in general is poorly written it can be very hard to work out how to use the cmdlets.
- Usage of the cmdlets is not as intuitive, first and foremost the cmdlets follow either the
Intialize-Vcf???
orInvoke-Vcf???
format, they then simply consume the operation ID from the swagger spec. This means you need to be familiar with the API documentation or at least need to consult it whilst developing your automation to understand the name of the cmdlet you need to perform a task. For example the PowerCLI cmdletInvoke-VcfGetSddcManager
would be the equivalent ofGet-VCFManager
in PowerVCF. - The PowerCLI engineering team are responsible for building the modules but they do not perform end-to-end testing, so as per my first point its possible you could find unknown issues.
Conclusion
With the release of VMware.Sdk.Vcf.CloudBuilder
and VMware.Sdk.Vcf.SddcManager
native to PowerCLI PowerCLI 13.2.0
we have a PowerShell module fully supported by VMware Global Support and providing 100% coverage of the Public APIs.