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 (>= 22.214.171.12406210)
- VMware.DeployAutomation (>= 126.96.36.19999828)
- VMware.ImageBuilder (>= 188.8.131.5299828)
- VMware.PowerCLI.VCenter (>= 184.108.40.20600125)
- VMware.Sdk.Nsx.Policy (>= 220.127.116.1142351)
- VMware.Sdk.Runtime (>= 18.104.22.16828394)
- VMware.Sdk.vSphere (>= 22.214.171.12478708)
- VMware.Vim (>= 126.96.36.19901056)
- VMware.VimAutomation.Cis.Core (>= 188.8.131.5201368)
- VMware.VimAutomation.Cloud (>= 184.108.40.20640183)
- VMware.VimAutomation.Common (>= 220.127.116.1167789)
- VMware.VimAutomation.Core (>= 18.104.22.16891293)
- VMware.VimAutomation.Hcx (>= 22.214.171.12491291)
- VMware.VimAutomation.HorizonView (>= 126.96.36.19929144)
- VMware.VimAutomation.License (>= 188.8.131.5239670)
- VMware.VimAutomation.Nsxt (>= 184.108.40.20668180)
- VMware.VimAutomation.Sdk (>= 220.127.116.1167606)
- VMware.VimAutomation.Security (>= 18.104.22.16833870)
- VMware.VimAutomation.Srm (>= 22.214.171.12491290)
- VMware.VimAutomation.Storage (>= 126.96.36.19991292)
- VMware.VimAutomation.StorageUtility (>= 1.6.0)
- VMware.VimAutomation.Vds (>= 188.8.131.5291295)
- VMware.VimAutomation.Vmc (>= 184.108.40.20668400)
- VMware.VimAutomation.vROps (>= 220.127.116.1167825)
- VMware.VimAutomation.WorkloadManagement (>= 18.104.22.16827055)
- VMware.VumAutomation (>= 22.214.171.12491294)
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