Release

PowerCLI 12.4 – What’s New

Hello everyone, It is time for you to update the PowerCLI module to the latest one, which is PowerCLI 12.4. The PowerCLI 12.4 is a very significant update with regards to how you will work with the REST APIs. Until now, we have had two major vSphere API bindings available for PowerCLI, and these are-

  • Get-View (SOAP API bindings)
  • Get-CISService (JSON-RPC)

Both of these API bindings are quite famous and still relevant for PowerCLI users. With PowerCLI 12.4, we’re introducing additional API binding for accessing the vSphere REST APIs. The new PowerCLI API bindings significantly improve the usability of working with vSphere REST APIs and provide PowerShell native user experience.

How to use vSphere Automation API SDK Module?

Update the current PowerCLI module to PowerCLI 12.4, and it will download a new set of PowerCLI modules packaged under ‘VMware.Sdk.vSphere’. This is a new manifest module containing sub-modules for all the REST APIs available for vSphere.

REST APIs have methods to execute the API and data structures to be used as an input to the API. The new API bindings provide low-level PowerShell functions to deal with the methods and data structure.

Invoke-

      The invoke function will be used to execute the REST methods, such as GET/PUT/POST and DELETE.

Initialize-

The Initialize function will be used to create the data structure which will be used as an input for REST API. For, Example Create a Local account.

Updated vSphere API Documentation

The vSphere API Documentation is updated with PowerCLI examples to invoke the respective REST API via PowerCLI. For example, check out the REST API documentation of Create Local Accounts, and you can find the example to invoke the same API using PowerCLI.

The new vSphere Management Module

A new module is introduced for vSphere Management. It is a PowerShell-based module backed by the newly introduced vSphere Automation API SDK modules. You can actually explore the source code of this module and understand how we have created PowerCLI cmdlets by leveraging the Invoke and Initialize functions provided by the new REST API bindings. Currently, the module contains 6 cmdlets to complement certificate management. Explore the cmdlet documentation to know more.

Add-VITrustedCertificate

Get-VIMachineCertificate

Get-VITrustedCertificate

New-VIMachineCertificateSigningRequest

Remove-VITrustedCertificate

Set-VIMachineCertificate

Other Improvements

  • Upsizing VMC SDDC
  • Copy-DatastoreItem is modified to support upload/download of vmdk files from vSAN datastore
  • API bindings in the Horizon module have been updated with the API features of the latest Horizon 8.3.

New PowerCLI Logo

We are updating the PowerCLI logo to adhere to the new VMware brand guidelines. You can access the new logo files from here.

 

 

To wrap this up, I would conclude that the new API bindings provide you the native PowerShell experience while working with REST APIs. Please check out the PowerCLI 12.4 release notes for more details on the improvements and bug fixes.

 


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 the certificate we used to sign the modules was replaced with a new one from a new publisher. To resolve this issue, you may be required to delete the existing module and re-install the module with the Install-Module cmdlet.


 

Comments

4 comments have been added so far

  1. Where is the documentation for the VMware.Sdk.vSphere* cmdlets (besides the examples from the REST documentation)? If the goal was to create a more “native” powershell experience, why use Invoke-* instead of Get-, Set-, New-,Add-,Remove- verbs as appropriate?

  2. To correctly uninstall/install this, I had to use this command sequence:
    Get-InstalledModule VMware.PowerCLI | Uninstall-Module -force | install-module vmware.powercli -scope AllUsers -force -SkipPublisherCheck -AllowClobber

  3. Why is Import-Module VMware.PowerCLI so much slower now. Running it on 12.3 takes at most 10 seconds. On 12.4 it takes more than 2 minutes.

Leave a Reply

Your email address will not be published. Required fields are marked *