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!