(This is the third part of five blog posts on new automation features and enhancements in the the latest VMware vSphere releases)
In our first post we talked about the improvements to vSphere APIs, new JSON-based protocols, and the new OpenAPI bindings. The second post was dedicated to vSphere SDKs. Now let’s talk more about PowerCLI, the powerful scripting and automation tool based on PowerShell. Being based on PowerShell offers many advantages, like simplicity of installation across many different operating systems and a full and powerful scripting language supporting the VMware-specific commands.
PowerCLI seamlessly integrates with the VMware ecosystem, ensuring compatibility and effortless integration with vSphere, vSAN, NSX, VMC, SRM, and more. Although PowerCLI operates independently with its own release cycle, we strive to align it with the official vSphere releases. This ensures that PowerCLI customers do not have to wait long to access new features and functions delivered in new versions of VMware vSphere.
Challenges with VMware PowerCLI
As with the other automation topics there are some challenges that face both VMware and customers when using PowerCLI. The first on our list here is the ability to use PowerCLI on all platforms that run PowerShell. Most people associate PowerShell with Microsoft Windows, which makes sense, but PowerShell Core is becoming quite popular on Linux and MacOS platforms as well. VMware needs to support those platforms equally well.
Second, as VMware vSphere and other VMware products evolve PowerCLI must change, too, and do so rapidly to keep up with the products. This rapid pace cannot impact usability and quality of the PowerCLI cmdlets. How do we expand PowerCLI coverage of a product, in a shorter time frame, with exceptional quality in the modules and cmdlets?
Multi-Platform Support
When PowerCLI 13.0 was released in November 2022 it was the first PowerCLI to be fully compatible with PowerShell Core, which runs on Microsoft Windows, Linux, and Apple MacOS. This means that a code sample or script can be run on any of those platforms, scheduled with cron on Linux, and so on. This makes it incredibly flexible as an automation tool, and means more options for orchestration tools, too.
Automating the Automation
In the 12.4 release of PowerCLI we introduced an innovative approach to generating cmdlets: through automation mechanisms. We automated the generation of cmdlets for vSphere Automation APIs and released them as part of a new module called VMware.SDK.vSphere (more details). This approach means we can rapidly produce cmdlets and modules to support new features, while ensuring quality and consistency, too.
However, the success of this strategy relies heavily on the quality of the product APIs. Moving forward, VMware’s focus is to ensure that APIs are released with the high-quality standards that also align with PowerCLI’s requirements.
Breadth of Coverage
Subsequent releases after 12.4 continued to introduce new PowerCLI modules based on this automated generation approach, such as VMware.Sdk.Nsx.Policy, VMware.Sdk.SRM, and VMware.Sdk.VR.
Introduced in PowerCLI 12.6, VMware.Sdk.Nsx.Policy enables customers to manage the NSX Policy API and is an important part of the multi-cloud experience, helping to set and audit security controls no matter where your workload runs.
In the 12.7 release, we provided new cmdlets to specify vSAN the health check thresholds as part of the VMware.CimAutomation.Storage module.
The 13.0 release made PowerCLI a multi-platform tool, which also meant that modules like VMware.ImageBuilder and VMware.DeployAutomation modules has to be compatible with Apple MacOS and Linux. Additionally, we added new commands for vSAN ESA cluster disk management and updated the VMware.VimAutomation.Cloud module to support the API features of VMware Cloud Director 10.4.
In our latest release, 13.1, we introduced two new modules: VMware.Sdk.VR for VMware vSphere Replication REST API support and VMware.Sdk.Srm for VMware Site Recovery Manager REST API support. We also added new cmdlets for Lifecycle Manager offline depots, vCenter Server remote datastore management, vSAN direct disk management, cluster shutdown, mounting of remote vSAN datastores from vSAN stretched clusters, and more.
What’s Next?
The next steps are more of the same – keep ensuring a high level of usability and quality for PowerCLI modules and cmdlets. We are doing this by continuing to enhance our own tools that generate the automated commands, as well as also checking and verifying the source APIs – in the products themselves – for quality. These efforts benefit all development and automation efforts, not just PowerCLI.
We also are continuing to expand PowerCLI coverage, introducing new modules and enhancing existing ones. A good example is support for VMware Cloud Foundation automation, allowing customers to control, configure, and automate those environments just as easily as they do vSphere.
Last, we will continue to maintain cross-platform support, allowing Windows, Linux, and MacOS users to enjoy PowerCLI equally.
Your Feedback Matters
Are you a fan of PowerCLI? Want to see something changed or added? You can submit your ideas to our feedback portal for consideration by the product managers. Please visit:
https://powercli.ideas.aha.io/
to submit ideas, and vote on others.