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:
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
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.
- VMware.CloudServices (>= 188.8.131.5206210)
- VMware.DeployAutomation (>= 184.108.40.20699828)
- VMware.ImageBuilder (>= 220.127.116.1199828)
- VMware.PowerCLI.VCenter (>= 18.104.22.16800125)
- VMware.Sdk.Nsx.Policy (>= 22.214.171.12442351)
- VMware.Sdk.Runtime (>= 126.96.36.19928394)
- VMware.Sdk.vSphere (>= 188.8.131.5278708)
- VMware.Vim (>= 184.108.40.20601056)
- VMware.VimAutomation.Cis.Core (>= 220.127.116.1101368)
- VMware.VimAutomation.Cloud (>= 18.104.22.16840183)
- VMware.VimAutomation.Common (>= 22.214.171.12467789)
- VMware.VimAutomation.Core (>= 126.96.36.19991293)
- VMware.VimAutomation.Hcx (>= 188.8.131.5291291)
- VMware.VimAutomation.HorizonView (>= 184.108.40.20629144)
- VMware.VimAutomation.License (>= 220.127.116.1139670)
- VMware.VimAutomation.Nsxt (>= 18.104.22.16868180)
- VMware.VimAutomation.Sdk (>= 22.214.171.12467606)
- VMware.VimAutomation.Security (>= 126.96.36.19933870)
- VMware.VimAutomation.Srm (>= 188.8.131.5291290)
- VMware.VimAutomation.Storage (>= 184.108.40.20691292)
- VMware.VimAutomation.StorageUtility (>= 1.6.0)
- VMware.VimAutomation.Vds (>= 220.127.116.1191295)
- VMware.VimAutomation.Vmc (>= 18.104.22.16868400)
- VMware.VimAutomation.vROps (>= 22.214.171.12467825)
- VMware.VimAutomation.WorkloadManagement (>= 126.96.36.19927055)
- VMware.VumAutomation (>= 188.8.131.5291294)
How to update to 12.7
- Open PowerShell.
- To update all PowerCLI modules, run the command:
Update-Module VMware.PowerCLI -Scope AllUser
- 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