April has been a release heavy month for VMware. We have seen releases for vSphere 6.7, the entire vRealize suite, Site Recovery Manager 8.1, Horizon 7.4.1, and quite a few more. As of today, PowerCLI is being added to that list with the release of 10.1.0!
PowerCLI 10.1.0 offers the following updates:
- Support for vSphere 6.7
- Support for NSX-T 2.1
- New VMware.Vim module
- New cmdlets for managing Auto Deploy script bundles
Let’s take a look at those and some of the other updates.
Compatibility is something very important to PowerCLI. PowerCLI version 10.1.0 adds support for both vSphere 6.7 and NSX-T 2.1. This update gives you access to continue automating the latest and greatest VMware releases, plus have access to all those new APIs!
This new version of PowerCLI brings our 20th module! This new module is named: VMware.Vim The goal of this module is to be able to allow you to have access to the latest vSphere APIs, including those available as part of VMware Cloud on AWS.
New Auto Deploy Cmdlets
Auto Deploy has two new cmdlets available to help with management of script bundles. These new cmdlets are:
The Set-ScriptBundleAssociation cmdlet allows us to configure ESXi hosts to be associated with specific Auto Deploy script bundles.
The Remove-ScriptBundle cmdlet allows us to remove script bundles from Auto Deploy in an automated fashion. This functionality was actually requested by the community as PowerCLI Idea 114, so it’s really cool to see the direct impact the community can have.
There’s a number of other improvements available in PowerCLI 10.1.0 as well. The first of which is to allow Import-VApp to support SHA-256 and SHA-512 hash algorithms. Next, we have deprecated the ‘Version’ parameter for the New-VM and Set-VM cmdlets. This parameter has been replaced by ‘HardwareVersion’. The same deprecation has been applied to the VirtualMachine object as a whole. Instead of referencing the ‘Version’ property, reference the ‘HardwareVersion’ property instead. Then, the Get-TagAssignment cmdlet has had the functionality corrected so we can query tags on datastore clusters. Another shout out to the community for this update, since that’s how this was brought to our attention! Also, we have made some updates to the process of migrating a VM to a VMware Cloud on AWS environment.
Lastly, PowerCLI 10.0.0 brought a bit of a change when it comes to handling vCenter and ESXi certificates. Instead of producing a warning when connecting to resources using invalid or self-signed certificates, PowerCLI now produces an error. We found some valid certificates were still producing an error and have corrected that process with PowerCLI 10.1.0.
If you do need to change PowerCLI’s configuration for handling certificate validation, the following code can be used to ignore those invalid or self-signed certificates:
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
PowerCLI 10.1.0 is the second release of the year and its only April! This release brought support for both vSphere 6.7 and NSX-T 2.1. A new module was introduced, VMware.Vim, making PowerCLI 20 modules strong. Two new cmdlets were added to help in the management of Auto Deploy script bundles! Plus, there were a number of other improvements added as well.
Remember, updating your PowerCLI modules is now as easy as ‘Update-Module VMware.PowerCLI’.
For more information on changes made in VMware PowerCLI 10.1.0, including improvements, security enhancements, and deprecated features, see the VMware PowerCLI Change Log. For more information on specific product features, see the VMware PowerCLI 10.1.0 User’s Guide. For more information on specific cmdlets, see the VMware PowerCLI 10.1.0 Cmdlet Reference.
19 comments have been added so far
Great to see that the ideas from PowerCLI community got implemented!
Keep up this good work!
Maybe I missed it, but is there a download link somewhere in this post?
No download link needed. Installation and upgrade is all handled through the PowerShell Gallery now!
If you’ve not used the PowerShell Gallery method before, see the following walkthrough: https://blogs.vmware.com/PowerCLI/2017/05/powercli-6-5-1-install-walkthrough.html
There is a need for offline installation (think DoD networks).
Is there a list of commands associated with VMware.VIM module? I tried get-command -module vmware.vim but it returns nothing. I’ve updated and loaded the module, get-module reports it. Or is this used like other .net calls with [ ]:: methods? If so, where are those listed?
Keep watching the blog, a blog post with more details on what’s going on will be released soon!
Does this update fix the DeSerialization error with get-vievent -maxsamples?
Unfortunately it does not. That issue is still a work in progress.
We tried deploying VMware.PowerCLI 10.1.0.8403314 to Azure and got the error below. Is there something we are doing wrong?
“Deployment template validation failed: ‘The resource ‘/modules/VMware.VimAutomation.Common’ at line ‘205’ and column ‘5’ is defined multiple times in a template. Please see https://aka.ms/arm-template/#resources for usage details.’. (Code: InvalidTemplate)”
Something seems to have changed with PowerCLI 10.0.0.7895300 and older versions that’s pulling in the latest version and breaking new installations? “Find-Module -Name VMware.PowerCLI -RequiredVersion “10.0.0.7895300” -IncludeDependencies | ft -AutoSize” shows modules for both 10.0.0.7895300 and 10.1.0.8403314. Same thing if you run “Find-Module -Name VMware.PowerCLI -RequiredVersion “18.104.22.16855375” -IncludeDependencies | ft -AutoSize”, it displays modules for 22.214.171.12455375 and 10.1.0.8403314.
Basically this has made it impossible to install older versions, as doing so results in installation of the latest version, causing conflicting Cmdlet names, especially between VMware.Vim and VMware.VimAutomation.Core.
Correction / Update: The conflicting Cmdlet names were not between VMware.Vim and VMware.VimAutomation.Core, rather VMware.VimAutomation.Core and The MS Failover Clustering Module that happened to be installed on this machine. Once that unneeded module was removed, installation of the latest version of PowerCLI worked fine.
I didn’t go back and re-try older versions but I expect that is still an issue, because explicitly running “Install-Module -Name VMware.PowerCLI -RequiredVersion “10.0.0.7895300”” resulted in the inclusion of the new VMware.Vim module, version 126.96.36.19943295.
Are there any plans to add Powershell commands to update VCSA similar to cli way? for example
Get-vCenter | Get-Updates | Install-updates -AcceptEulas -Reboot
or something like this.
Especially having an option to reboot vCenter succesfull updates installation would be really handy.
software-packages install –staged –RebootOnSuccess