PowerCLI 12.0.0

VMware PowerCLI 12.0.0

VMware released a new PowerCLI version, version 12.0.0. I will cover in this article the improvements brought by PowerCLI 12.0.0 and the easy installation process on both Windows and Linux. For full documentation on this version of PowerCLI you can check the code.vmware.com page.

PowerCLI 12.0.0 Changes

New features:

  • New module: VMware.VimAutomation.WorkloadManagement -provides cmdlets for managing namespace lifecycle and policy for Project Pacific.
  • New module: VMware.CloudServices – provides cmdlets for managing VMware Cloud Services.

Updates:

  • The VMware.VimAutomation.vROps module has been updated to support VMware vRealize Operations Manager 8.0 and work on Linux and macOS.
  • The VMware.VimAutomation.License module has been ported to work on Linux and macOS.
  • The VMware.Vim module has been updated to contain API bindings for vSphere 7.0.
  • The VMware.VimAutomation.HorizonView module has been updated to support VMware Horizon 7 version 7.12.
  • The security of the New-VcsOAuthSecurityContext cmdlet has been improved when using a browser authentication by adding support for Proof Key for Code Exchange (PKCE).
  • The New-OAuthSecurityContext cmdlet has been added to the VMware.VimAutomation.Common module to allow an OAuth authentication in vSphere 7.0.
  • The Network and StoragePolicy parameters have been added to the Move-VM cmdlet.
  • The Get-VMGuestDisk cmdlet has been added to provide guest disk information for a virtual hard disk.
  • The VMGuestDisk parameter has been added to the Get-HardDisk cmdlet to allow retrieving virtual hard disks by guest disks.
  • The NetworkStack parameter has been added to the New-VMHostNetworkAdapter cmdlet to allow specifying the network stack of a virtual machine host network adapter.
  • The Open-VMConsoleWindow cmdlet has been ported to work on Linux and macOS and VMware VMRC is a prerequisite for this cmdlet.
  • The UseRemoteAuthentication parameter has been added to the Connect-NsxtServer cmdlet to support the Workspace ONE authentication.
  • The MobilityGroupMigration parameter has been added to the New-HCXMigration cmdlet enabling you to create a client side HCXMigration object which can be provided as an input to the New-HCXMobilityGroup cmdlet.
  • The Vcpus and Memory parameters have been added to the Get-HCXMigration cmdlet.
  • The Force parameter has been added to the Remove-HCXServiceMesh and Remove-HCXNetworkExtension cmdlets providing the ability to force remove the service mesh and network extensions.

Bug fixes:

  • Add-Passthroughdevice fails when you try to add another PCI device.
  • Get-AlarmDefinition – when using Remove-AlarmAction, you cannot remove some actions for a predefined alarm.
  • Get-CIUSer – if your role is not set, Get-CIUser fails.
  • Get-ContentLibrary throws an error for content libraries that are backed by a file share.
  • If you run Get-OMAlertDefinition against vRealize Operations Manager 7.0 or later, you receive an error message of type fromIndex(1000) > toIndex(448).
  • Get-SpbmStoragePolicy – when trying to retrieve Virtual Volumes replication group details, the operation throws an exception of type The string was not recognized as a valid DateTime. There is an unknown word starting at index 0.
  • If the environment has a large number of replication groups, Get-SpbmReplicationGroup throws an error message of type Exceeded the maximum number of elements in batch that the VASA provider can support.
  • Move-VM – cross vCenter vMotion of powered off virtual machines may fail to properly attach the network adapters to the specified port group and may leave them disconnected.
  • New-AlarmAction – when creating an email alarm action with multiple recipients, they do not appear correctly in the UI.
  • When running New-HardDisk, the maximum number of hard disks per SCSI controller is incorrectly determined by the ESXi server version instead of by the virtual machine hardware version.

Install PowerCLI 12.0.0

Moving to the easy part now, let’s install PowerCLI 12.0.0 in a new Windows box. Make sure you have at least PowerShell 5.1 installed, open a PowerShell console and run the install command:

Install-Module VMware.PowerCLI -Scope CurrentUser

Install PowerCLI 12.0.0 on Windows

The install procedure for Linux is the same, we need to run same command at a PowerShell prompt. Make sure you have installed at least PowerShell 7.

Install PowerCLI 12.0.0 on Linux

Happy PowerCLI scripting 🙂

Constantin Ghioc

I usually play with vSphere API, Ansible, vRealize Automation, vRealize Orchestrator, and different AWS tools. In my other life I’m a husband and a father, an amateur photographer and a Go enthusiast.

Leave a Reply