The PowerCLI team has some exciting news this week! PowerCLI version 12.7 is out and it’s packed with lots of new and exciting features. We have made a long requested module available on PowerShell Core, extended many cmdlets and added some new ones, and also improved the performance of others.
PowerCLI 12.7 comes with the following updates:
- The VUM 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.
Let’s take a closer look at some of these updates.
Multi-platform VUM module
One of the last non-multiplatform PowerCLI modules is now available for Linux and macOS after a lot of customer requests that we received in the last months and years. We started our multiplatform journey shortly after the first PowerShell core version was launched. Since then we’ve ported almost all of the PowerCLI modules with now only two modules left. We’re very happy to see that our hard work in this direction already pays off – 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.
NSX module improvements
We have introduced the new NSX SDK module in PowerCLI 12.6. If you haven’t already you can check this great blog post from Madhukar Krishnarao on how to use it to perform the most common NSX operations. In this release we’re updating it with the latest NSX API features, adding remote authentication to the Connect-NsxServer cmdlet with the -UseRemoteAuthentication parameter, and improving the usability of Get-NsxOperation cmdlet.
Let’s dig a bit deeper in the Get-NsxOperation improvements. We have 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.
New vSAN cluster configuration options
We have 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 mount or unmount datastore from another cluster as remote datastore using Set-VsanClusterConfiguration. Here are some samples:
1 2 |
$newThreshold = New-VsanHealthCheckThreshold -Enabled $true -YellowValue 95 -RedValue 99 -Target VsanDatastore Set-VsanClusterConfiguration -Configuration $cluster -CapacityThreshold $newThreshold -HistoricalHealthEnabled $false |
1 2 |
$remoteDatastore = Get-Datastore 'MyDatastore' Set-VsanClusterConfiguration -Configuration $cluster -MountRemoteDatastore $remoteDatastore |
Certificate issue while upgrading
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.
Summary
PowerCLI 12.7 comes with improved multiplatform support, NSX and vSAN improvements, and SRM and HCX performance optimizations. For a full list of all improvements and fixes check the PowerCLI 12.7 release notes. For more information on specific cmdlets, see the PowerCLI Cmdlet Reference.
Let us know in the comments what you’re looking forward to most!