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 (>= 184.108.40.20606210)
- VMware.DeployAutomation (>= 220.127.116.1199828)
- VMware.ImageBuilder (>= 18.104.22.16899828)
- VMware.PowerCLI.VCenter (>= 22.214.171.12400125)
- VMware.Sdk.Nsx.Policy (>= 126.96.36.19942351)
- VMware.Sdk.Runtime (>= 188.8.131.5228394)
- VMware.Sdk.vSphere (>= 184.108.40.20678708)
- VMware.Vim (>= 220.127.116.1101056)
- VMware.VimAutomation.Cis.Core (>= 18.104.22.16801368)
- VMware.VimAutomation.Cloud (>= 22.214.171.12440183)
- VMware.VimAutomation.Common (>= 126.96.36.19967789)
- VMware.VimAutomation.Core (>= 188.8.131.5291293)
- VMware.VimAutomation.Hcx (>= 184.108.40.20691291)
- VMware.VimAutomation.HorizonView (>= 220.127.116.1129144)
- VMware.VimAutomation.License (>= 18.104.22.16839670)
- VMware.VimAutomation.Nsxt (>= 22.214.171.12468180)
- VMware.VimAutomation.Sdk (>= 126.96.36.19967606)
- VMware.VimAutomation.Security (>= 188.8.131.5233870)
- VMware.VimAutomation.Srm (>= 184.108.40.20691290)
- VMware.VimAutomation.Storage (>= 220.127.116.1191292)
- VMware.VimAutomation.StorageUtility (>= 1.6.0)
- VMware.VimAutomation.Vds (>= 18.104.22.16891295)
- VMware.VimAutomation.Vmc (>= 22.214.171.12468400)
- VMware.VimAutomation.vROps (>= 126.96.36.19967825)
- VMware.VimAutomation.WorkloadManagement (>= 188.8.131.5227055)
- VMware.VumAutomation (>= 184.108.40.20691294)
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