ESX

New Release – PowerCLI 12

This week has been full of announcements, releases, and so much other excitement. We can’t help but join in with a release of our own in the form of PowerCLI 12.0.0! This new release comes complete with a massive amount of new functionality, support for newly released products, and some performance improvements too.

PowerCLI 12.0.0 comes with the following updates:

  • Added cmdlets for ESXi host network management
  • Added cmdlets for HCX management
  • Added cmdlets for Namespace Management
  • Added cmdlets for Trusted Host Services management
  • Added cmdlets for VM Guest Disk management
  • Added cmdlets for VMware Cloud on AWS management
  • Added cmdlets for vSAN management
  • New module for VMware Cloud Services management
  • Updated support for vSphere 7.0
  • Updated support for vRealize Operations 8.0
  • Updated support of the License module for multiplatform use
  • Updated support of the vROps module for multiplatform use
  • Updated support of Open-VMConsoleWindow for multiplatform use
  • Updated support of Move-VM to include opaque networks
  • Updated support for PowerShell versions

Let’s take a better look at some of these updates!

VM Guest Disk Management

One of the most requested features of all time has finally been introduced! We can now map a guest-based partition to a VM’s VMDK. There are a couple caveats to this as this capability is not solely based on PowerCLI’s functionality. First, your environment will require to be using vSphere 7. This is because of a new property called “Mapping” which has been added to the Guest service. Next, your VM will need to be running VMware Tools 11.0 or newer. Lastly, the initial release of the vSphere API only supports Windows operating systems.

Once those requirements are all checked off, we’re ready to use PowerCLI to map our guest partition to a VMDK with a new cmdlet and a new parameter. The new cmdlet is Get-VMGuestDisk. The new parameter is VMGuestDisk, which can be used with the existing Get-HardDisk.

Here’s an example of these two new features in action:

 

ESXi Host Netstack Support

vSphere 6.0 added the concept of network stacks to ESXi hosts. This feature gives us the ability to assign different default gateways to the VMKernel adapters so we can route that traffic throughout the network. There were two main ways to automate the management of these netstacks, by way of ESXCLI or through the API. PowerCLI can use both of those methods, but it would require several lines of code. PowerCLI 12 introduces two new cmdlets and a new parameter to easily manage a vSphere environment’s network stacks!

These new cmdlets are: Get-VMHostNetworkStack and Set-VMHostNetworkStack. The new parameter is named “NetworkStack” and has been added to the New-VMHostNetworkAdapter cmdlet.

Here’s an example of creating new host network adapter and assigning it to the vmotion network stack:

Updated PowerShell Version Support

PowerCLI always strives to be up to date with the latest and greatest releases, which also includes PowerShell itself. Recently, Microsoft released PowerShell 7.0 and PowerCLI 12 will be the first version to support it. This new release also includes support for .NET Framework 4.7.2 and newer and adds support for .NET Core 3.1.

We also have to be aware of when releases are no longer supported. Historically, when it comes to VMware products, once a product is no longer supported, we also stop supporting it for PowerCLI. This too extends to PowerShell and the .NET Framework. With this release, we have deprecated support for vSphere 6.0, Windows PowerShell 5.0 and prior as well as PowerShell Core 6.x. This will also include deprecations for .NET Frameworks versions before 4.7.2 and .NET Core 2.0.

 

Compatibility Matrix for VMware PowerCLI 12.0.0
OS Type .NET Version PowerShell Version
Windows .NET Framework 4.7.2 or later Windows PowerShell 5.1
Linux .NET Core 3.1 PowerShell 7
macOS .NET Core 3.1 PowerShell 7

 

Over the years, PowerCLI users have made comments and even feature requests regarding the supported operating systems. Due to the above changes in support for PowerShell and .NET versions, we are also able to increase the supported operating systems as well! This translates into PowerCLI supporting any and all OSes which PowerShell supports. A detailed list of these OSes can be found on Microsoft’s documentation site: PowerShell support lifecycle.

Summary

The first release of PowerCLI for this year is here and it’s a major update! PowerCLI 12 adds support for the newly released vSphere 7 as well as high level cmdlets for new features like Namespaces and Trusted Host Services. There are several modules which have been converted over to support multi-platform versions of PowerShell, including the vROps and License modules. VMware Cloud based services continue to see new high-level cmdlets. This release adds Organization and user management capabilities. With all these great new additions and so many more, you’ll want to upgrade to PowerCLI 12 today!

For more information on changes made in VMware PowerCLI 12.0.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 12.0.0 User’s Guide. For more information on specific cmdlets, see the VMware PowerCLI 12.0.0 Cmdlet Reference.

Remember, updating your PowerCLI modules is now as easy as:

Update-Module VMware.PowerCLI

Let us know in the comments what you’re looking forward to most!

 

Comments

41 comments have been added so far

  1. I am interested in clarification of PowerShell 7.0 support. Is it supported on Windows? Specifically I guess I am interested in whether the VUM module has been updated to support Core.

    1. EXACTLY my question. Today, more than a year later, there’s still nox explicit answer to this question. A shame, to be honest.

  2. PS H:\> Install-Module -Name VMware.PowerCLI
    WARNING: Source Location ‘https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Sdk/12.0.0.15939651’ is not valid.
    PackageManagement\Install-Package : Package ‘VMware.VimAutomation.Sdk’ failed to download.

    1. Hi,
      To be more complete in my answer, since April 1, the use of TLS 1.2 is mandatory to download packages from “Powershell gallery”.

      Otherwise you will get the message below :

      Install-Module -Name VMware.PowerCLI -Scope AllUsers

      WARNING: Source Location ‘https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Sdk/12.0.0.15939651’ is not valid.
      PackageManagement\Install-Package : Package ‘VMware.VimAutomation.Sdk’ failed to download.

  3. Hi, this weekend is nice in favor of me, because this point in time i am reading this great educational paragraph here
    at my residence.

  4. I’m trying to use “VMware PowerCLI 12.1.0 build 17009493” with PowerShell Core 7 (powershell-lts-7.0.3-1.rhel.7.x86_64) on Linux (CentOS 7.8) to connect to vROPs using the “Connect-OMServer”.

    I get the following error:
    Connect-OMServer: 12/15/2020 5:31:28 PM Connect-OMServer Unable to connect to the remote server. Check the inner exception for more details.

    Anyone else having this issue?

    I also have dotnet-sdk-3.1-3.1.404-1.x86_64 and dotnet-sdk-5.0-5.0.101-1.x86_64 both installed.

  5. What about PowerCLI 12.x compatibility to PowerShell 7.x on WIndows?

    Is PowerCLI 12.x feature-complete on PowerShell 7.x in comparison to PowerShell 5.1?

    I would LOVE to go to PowerShell 7.x, for “ForEach -Parallel” alone, but will need the same feature set as it it available on PowerShell 5.1.

    Please finally clarify!

  6. The entries on this page are all incredibly significant. Reading this essay taught me a lot. I wish you all the best with this website. I was looking for something similar to this. Thanks.

  7. Excellent short articles are intended to be brief. They use as few words as possible to convey a lot of meaning. In fact, the more you learn about writing, the more you’ll discover how much can be said in a relatively short amount of written text.

    1. leases are no longer supported. Historically, when it comes to VMware products, once a product is no longer supported, we also stop supporting it for PowerCLI. This too extends to PowerShell and the .NET Framework. With this release, we hav

  8. use as few words as possible to convey a lot of meaning. In fact, the more you learn about writing, the more you’ll discover how much can be said in a relatively short amount of written text.

Leave a Reply

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