Modern SDDC are centrally configured through Infrastructure-as-code or Gitops frameworks to ensure consistency and traceability. However, managing an environment query the running state and interact with various components help with troubleshooting and automating manual tasks that don’t need to be centrally automated. In which case, VMware PowerCLI is still the tool of choice for most VI admins as it includes a number of modules to talk with the majority of the VMware portfolio.
Recently, VMware released PowerCLI 13.0 in GA which, among other things, brings support for vSphere 8, vSAN ESA and becomes multi-platform. In this blog, we will have an overview of what it means for VI admins.
PowerCLI becomes multi-platform
You may now wonder “what does multi-platform” mean? PowerCLI has been on a journey to be compatible with more OSes than just Microsoft Windows. As you may know you could already run PowerShell in Linux and MacOS with PowerShell core and VMware followed suite with their module.
With PowerCLI 13, the command line tool is now full featured across all supported OSes.
The only caveats remain the ImageBuilder modules which now requires Python 3.7 or above with a handful of additional packages to run (six, psutil, lxml, pyopenssl).
VMware Cloud Director 10.4 support
In the last few years, VCD has been playing to catch up with the many changes in NSX-T/NSX and NSX ALB. The latest version of VMware Cloud Director 10.4 brought a number of core enhancements to the platform along with new API features (API version 37.0). PowerCLI 13 adds support to fully leverage the capabilities of VCD 10.4.
VSAN Express Storage Architecture (ESA)
During VMware Explore 2022, VMware unveiled vSphere 8 with VSAN 8 which brought a completely revamped storage architecture known as Express Storage Architecture, the older one being now referred to as Original Storage Architecture. This new architecture improves the performances of VSAN significantly in terms of performances and optimization.
PowerCLI 13 introduces new cmdlets that are specific to VSAN 8.0 ESA:
- Get-VsanEsaEligibleDisk
- Add/Get/Remove-VsanStoragePoolDisk: Storage Pool replaces disk groups
- New/Set-Cluster: Updated for ESA
- Get-VsanClusterConfiguration: Updated for ESA
Other improvements
Among improvements that I would classify as “miscellaneous”, you will find:
- Added documentation for the NSX SDK module in the PowerCLI user guide
- Deprecation of old cmdlets using old NSX api calls
- Support for seed checkpoint and migration of custom attributes in VMware HCX
- vSphere and Horizon modules have been updated to support the latest API features of vSphere 8 and Horizon 8 2209
- OS customization spec support has been updated to support IPv6 and customization scripts
PowerCLI cmdlets by product documentation
If you want to know more about PowerCLI cmdlets in an easy-to-use and educational manner, you can refer to the new documentation that references PowerCLI cmdlets for each product
This documentation is great as it gives you a plethora of examples on cmdlets and how to use them. It makes leveraging the modules a lot easier and faster as you don’t necessarily have to dive into PowerCLI object or the code references.
Note that it will only give you details about actual cmdlets, so if you are after more advanced use cases like SRM or Horizon View where you have to work with the API or build your own cmdlets you will still have to use the developer guide.
How to update to PowerCLI 13
In order to update PowerCLI, it is recommended to uninstall it and then reinstall the new version to make sure you get the latest and greatest.
- First, start by uninstalling PowerCLI
Get-module VMware.* -listAvailable | Uninstall-Module -Force
- You can then simply install the latest version of PowerCLI
Install-Module VMware.PowerCLI -Scope CurrentUser
If your machine is isolated from the internet and you can use Install-module because you don’t have access to PowerShell Gallery, you can use the Save-Module cmdlet to download the module, then copy it to a USB for instance and physically transfer it to your management workstation.
Wrap up
While VMware PowerCLI is now an old product which made its way from PowerShell snapin to autoloading module stored in the PowerShell Gallery, it is still widely in use across the board among VMware administrators. PowerCLI is now compatible with the majority of the VMware portfolio. Granted you may have to tinker a bit with the API now, depending on what you need – but it is generally a straightforward process, thanks to the intuitive and forgiving nature of the PowerShell syntax.
Related posts:
What’s New in PowerCLI 12
Build your Own Tailored PowerCLI Commands
Getting started with VMware Datacenter Command-Line Interfaces(DCLI)
Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.