PowerCLI 12.7 is here and packed with a lot of new features!

The new version of PowerCLI has been released. The release has number 12.7 and is packed with new and exciting features. Along with improving the performance, VMware added new cmdlets and worked on existing ones, however, the most significant was work on a long-requested module available on PowerShell Core.

Let’s have a look into PowerCLI updates:

  • The VUM (VMware Update Manager) module has been ported to PowerShell 7 and now supports Linux and macOS
  • Remote authentication support has been added to Connect-NsxServer cmdlet.
  • The usability of Get-NsxOperation cmdlet has been improved.
  • The NSX module has been updated with the latest API features.
  • The Horizon module has also been updated with the latest API features of Horizon 8.4.
  • Support for vSAN health check threshold, historical health check, and remote datastores has been added to the vSAN cluster configuration.
  • Performance improvements in Connect-SrmServer and Get-HCXVM cmdlets.

Long-time expected multi-platform VUM module:

A lot of users were asking for this to happen over the years and finally, VMware delivered. One of the last non-multiplatform PowerCLI modules is now available for Linux and macOS. PowerCLI is now the multi-platform VMware CLI with more than half of our users today using PowerShell 7 and more than 40% using PowerCLI on Linux and macOS.

The Get-NsxOperation improvements:

VMware changed the way the -Path parameter works in Get-NsxOperation. In 12.6 it required the path to be in the format that is used in the NSX API specification, which was different from the one that was used in the NSX API documentation. This is now changed and you can just copy/paste the operation URL from the API documentation to get the corresponding PowerCLI cmdlet with Get-NSXOperation as in the example below:

Source: https://blogs.vmware.com/PowerCLI/2022/07/new-release-powercli-12-7.html

Another change in the -Path parameter behavior is that it no longer returns all the operations that contain the specified path, but only the exact matches. Of course, you can still use wildcards to find multiple operations by part of the path.

Changes to vSAN cluster configuration options:

VMware added several new vSAN cluster configuration options. You can now set vSAN health check thresholds using the -CapacityThreshold parameter of Set-VsanClusterConfiguration and New-VsanHealthCheckThreshold. You can also enable or disable vSAN historical health check as well as a mount or unmount datastore from another cluster as a remote datastore using Set-VsanClusterConfiguration. Here are some samples:

$newThreshold = New-VsanHealthCheckThreshold -Enabled $true -YellowValue 95 -RedValue 99 -Target VsanDatastore
Set-VsanClusterConfiguration -Configuration $cluster -CapacityThreshold $newThreshold -HistoricalHealthEnabled $false
$remoteDatastore = Get-Datastore 'MyDatastore'
Set-VsanClusterConfiguration -Configuration $cluster -MountRemoteDatastore $remoteDatastore

Technical overview:

Modules that have been updated in PowerCLI 12.7.0:

  • VMware.PowerCLI: Provides a root module which other modules are dependent on. This ensures the PowerCLI product can be installed, upgraded, and removed as a complete package if needed.
  • VMware.VimAutomation.Core: Provides cmdlets for automated administration of the vSphere environment.
  • VMware.VimAutomation.Common: Provides functionality that is common to all PowerCLI modules. This module has no cmdlets, but is required for other modules to function correctly.
  • VMware.VimAutomation.Sdk: Provides SDK functionality that is needed by all PowerCLI modules. This module has no cmdlets, but is required for other modules to function correctly.
  • VMware.VimAutomation.Vmc: Provides cmdlets for managing VMware Cloud on AWS features.
  • VMware.VimAutomation.Vds: Provides cmdlets for managing vSphere distributed switches and distributed port groups.
  • VMware.VimAutomation.HorizonView: Provides cmdlets for automating VMware Horizon features.
  • VMware.VimAutomation.Srm: Provides cmdlets for managing VMware Site Recovery Manager features.
  • VMware.VimAutomation.Storage: Provides cmdlets for managing vSphere policy-based storage.
  • VMware.VimAutomation.Hcx: Provides cmdlets for managing VMware HCX features.
  • VMware.Sdk.Nsx.Policy: Provides auto-generated cmdlets for accessing the NSX Policy API.



How to update to 12.7

  1. Open PowerShell.
  2. To update all PowerCLI modules, run the command:
Update-Module VMware.PowerCLI -Scope AllUser
  1. Alternatively, you can update individual PowerCLI modules by running the Update-Module cmdlet with the module name.

NOTE: You may encounter a certificate error while updating the existing PowerCLI module via Update-Module, as discussed here. This is due to the fact that we replaced the certificate we used to sign the modules with a new one from a new publisher. To resolve this issue delete the existing module and re-install the module with the Install-Module cmdlet.

Please like and share to spread the knowledge in the community.


If you want to chat with me please use Twitter: @AngrySysOps

Join my  VMware Knowledge Base Group: https://bit.ly/3w54tbc

Visit my FB page: https://www.facebook.com/AngrySysOps

Subscribe to my channel: https://bit.ly/3vY16CT

Please leave the comment