Home > Blogs > VMware PowerCLI Blog


New Release: VMware PowerCLI 10.0.0

We are only two months in to 2018, but it has already been pretty exciting from an automation standpoint. Let’s review some of the big news. Microsoft open-sourced and released PowerShell 6.0. They also made it available on a number of operating systems, from Windows to Linux to Mac OS. Then, PowerCLI hit 2,000,000 downloads from the PowerShell Gallery! Today, we are releasing VMware PowerCLI 10.0.0!

Let’s talk about the version change for a second. If you’ve been a PowerCLI user for a couple years, you have probably noticed quite the transformation here recently. One item of note was when the name was changed from vSphere PowerCLI to VMware PowerCLI. This was due to PowerCLI’s ability to manage more than just vSphere. With this release, we are taking that next step to remove ourselves from being in lockstep with vSphere’s versioning. Why did we go with 10? Well, PowerCLI recently celebrated its 10th birthday so it seemed like the perfect number!

Time to take a look at everything that’s new!

Multi-Platform Support

PowerCLI 10.0.0 adds support for Mac OS and Linux! The only pre-requisite is to have PowerShell Core 6.0 installed. The installation process is also the same:

PowerCLI 10 Install Example on a MacOS System

This release brings support for the following modules:

  • VMware.VimAutomation.Cis.Core
  • VMware.VimAutomation.Common
  • VMware.VimAutomation.Core
  • VMware.VimAutomation.Nsxt
  • VMware.VimAutomation.Vds
  • VMware.VimAutomation.Vmc
  • VMware.VimAutomation.Sdk
  • VMware.VimAutomation.Storage
  • VMware.VimAutomation.StorageUtility

Future releases of PowerCLI will continue to add support for the remaining modules.

Default Certificate Handling

This version changes the way certificates are handled when connecting to a vCenter server or ESXi host with the Connect-VIServer cmdlet. If your connection endpoint is using an invalid certificate (self-signed or otherwise), PowerCLI would previously return back a warning. The handling has been updated to be more secure and now return back an error.

If you are using an invalid certificate, you can correct the error with the ‘Set-PowerCLIConfiguration’ cmdlet. The parameter needing to be configured is ‘InvalidCertificateAction’ and the available settings are Fail, Warn, Ignore, Prompt, and Unset.

The following code will configure the ‘InvalidCertificateAction’ parameter to be Ignore:

Deprecated Cmdlets and Property

There are five cmdlets being deprecated. These cmdlets are found in the VMware.VimAutomation.Core module. They are:

  • Get-VMGuestNetworkInterface
  • Set-VMGuestNetworkInterface
  • Get-VMGuestRoute
  • New-VMGuestRoute
  • Remove-VMGuestRoute

These cmdlets are replaced with the use of the Invoke-VMScript cmdlet.

Sample code to change the IP Address of a Windows VM:

One other deprecation is to the Client property. If you have any scripts that are making use of the ‘Client’ property, you’ll want to get those updated to use the ServiceInstance managed object. More information can be found at the following: ServiceInstance

Resolved Issues

First, I want to thank the community for this section. There was an overwhelming amount of feedback that came in and I’m quite excited about how many items we were able to get resolved! Let’s check some of them out:

  • Piping the Get-Datacenter cmdlet output to Get-Cluster now works when more than one datacenter is present
  • Configuring manual MAC addresses with the New/Set-NetworkAdapter cmdlet now accepts all addresses, not just MAC addresses in the 00:50:56 range
  • VMs with snapshots can be Storage vMotioned to VMFS6 datastores without hitting a ‘redoLogFormat’ error
  • Lots of updates to the Get-TagAssignment cmdlet, including when connected to two vCenter Servers and also displays the Tag Category as expected

Summary

Today, we release PowerCLI 10.0.0. This release adds support for PowerShell Core 6 which can be run on Linux and Mac OS systems. There are also a handful of VMGuest related cmdlets which have been removed from the release. Their functionality can be replaced with the usage of Invoke-VMScript. Lastly, there have been several corrections. Many of which are thanks to our amazing community for bringing them to our attention.

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

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

This entry was posted in General and tagged , , on by .
Kyle Ruddy

About Kyle Ruddy

Kyle Ruddy is a Senior Technical Marketing Architect working for VMware R&D in the Cloud Platform Business Unit. Kyle currently focuses on vSphere and VMware Cloud on AWS automation and the associated automation frameworks including all things API, CLI, and SDK. Kyle is also a Microsoft MVP and long-term vExpert whom can be found blogging on VMware blogs, http://blogs.vmware.com/vSphere and http://blogs.vmware.com/PowerCLI, and his personal blog, https://www.kmruddy.com. His Twitter: @kmruddy

42 thoughts on “New Release: VMware PowerCLI 10.0.0

  1. Pingback: New Release: VMware PowerCLI 10.0.0 – VMPRO.AT – all about virtualization

  2. Robert van den Nieuwendijk

    The VMware PowerCLI Change Log is not updated yet with VMware PowerCLI 10.0.0 information.

    Reply
  3. Pingback: VMware PowerCLI 10.0 Released | Virtual Allan

  4. Pingback: PowerCLI for OSX is out! - Yellow Bricks

  5. Markus Fischbacher

    Import-Module : VMware.VimAutomation.Srm module is not currently supported on the Core edition of PowerShell
    Think you missed something 😀

    Reply
    1. Martin Etcheverry

      i am in the same boat!

      Reply
  6. Vandrey Trindade

    When we use the “Update-Module VMware.PowerCLI” command it downloads the new version and keeps the old versions installed.
    There is a way to update a module removing the older versions of it?

    Reply
    1. Andrew Palmer

      This is not a PowerCLI thing but just how PowerShell updates modules. I wrote this to remove all but the current version of modules on my system. This isn’t just PowerCLI but all modules on my system installed from the PowerShell Gallery…

      Get-InstalledModule | ForEach-Object {
      $CurrentVersion = $PSItem.Version
      Get-InstalledModule -Name $PSItem.Name -AllVersions | Where-Object -Property Version -LT $CurrentVersion
      } | Uninstall-Module -Verbose

      If you only want to remove older version of PowerCLI and leave older versions of other modules you could use this instead…

      Get-InstalledModule -Name VMware.PowerCLI | ForEach-Object {
      $CurrentVersion = $PSItem.Version
      Get-InstalledModule -Name $PSItem.Name -AllVersions | Where-Object -Property Version -LT $CurrentVersion
      } | Uninstall-Module -Verbose

      Reply
      1. Andrew Palmer

        Oh I forgot to add that VMware.PowerCLI has dependencies which each will fail to uninstall due to being dependencies. You can force these to uninstall by add a -Force to the very end of the script…

        Get-InstalledModule | ForEach-Object {
        $CurrentVersion = $PSItem.Version
        Get-InstalledModule -Name $PSItem.Name -AllVersions | Where-Object -Property Version -LT $CurrentVersion
        } | Uninstall-Module -Verbose -Force

        Reply
        1. Vandrey Trindade

          Andrew Palmer,

          Thanks! I’ve added the “-Force” parameter to my script of module cleaning.

          Reply
  7. Doug Roorda

    Does the new cert requirement work with internal CA’s. I have a trusted cert on my server, but still get an invalid cert error when attempting to connect the client.

    Reply
    1. Damien Solodow

      It’s not just you; I reported it yesterday (and opened a support case today) and I’ve seen a few others report it in the Slack channel

      Reply
      1. Doug Roorda

        Good to know I am not alone. Would love to know what they come back with.

        Reply
  8. Pingback: New Release: VMware PowerCLI 10.0.0 | CLOUDBITZ

  9. Kevin Leek

    Is there a package/offline installation option? i’m having no success from behind proxy despite other functions and access from Powershell 6.0 working.

    Reply
    1. Paula Kingsley

      You can download it on another computer …

      PS C:\> Save-Module -Name VMware.PowerCLI -Path c:\temp\vmware

      Reply
    2. MadMonk

      This! Jeez, just give us a download link!

      Reply
  10. Sheree

    Connect-VIServer errors with “Method not found: ‘Void Vmware.Binding.Sts.VmwareSecruityTokenService..ctor(System.Uri)’.”
    Guessing the problem is ‘Security’ is typoed?

    Reply
    1. James

      I am having the same issue except only when I attempt to connect to a VCSA 6 server. I have no issue connecting to VC 5.5.

      Reply
  11. Sheree

    Doh! I didn’t pay close enough attention to Vandrey’s comment–the dumb Update/Install-Module commands are basically doing nothing; I’ve still got *ONLY* 6.5.0 after both commands. @#$#@#ing PowerShell!

    Reply
  12. BENJAMIN M MITCHELL

    Install-Module -Name VMware.PowerCLI -Scope CurrentUser resulted in only installing the following modules

    Script 10.0.0…. VMware.VimAutomation.Core
    Script 10.0.0…. VMware.VimAutomation.Vds

    I’ve tried running the command multiple times.

    Reply
  13. Byron

    Can we PLEASE have the MSI installer back? Here is the issue I am running in to when I try the offline method of importing the module:

    C:> Import-Module vmware.powercli
    Import-Module : Exception calling “OnImportModule” with “2” argument(s): “The type initializer for
    ‘VMware.VimAutomation.Cis.Nsxt.Interop.V1.NsxtServiceFactory’ threw an exception.”
    At line:1 char:1
    + Import-Module vmware.powercli
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Import-Module], MethodInvocationException
    + FullyQualifiedErrorId : TypeInitializationException,Microsoft.PowerShell.Commands.ImportModuleCommand

    This is a new install of PowerCLI with no previous installations. The modules are there when I list them as well.

    Reply
  14. Josh Andringa

    I have not been able to get this to work since it was released. I am running PowerShell 5.1 and PowerShell 6.0 (Core) on my machine. In 5.1 I get an error where the log4net assembly fails to load, and on 6.0 I am presented with VMware.VimAutomation.Srm module is not currently supported on the Core edition of PowerShell. I’m pulling my hair out trying to get this to work, and am now at the point of fallback to 6.5.4. I really don’t see how this made it to a shipped version since it doesn’t work with either version of PowerShell that I have for Windows 10.

    Reply
  15. Josh Andringa

    I am unable to get this to work with PowerShell 5.1 or PowerShell 6.0 (Core). In 5.1 I fail to load log4net, and in 6.0 it fails to import VMware.VimAutomation.Srm as it’s not supported. I’m falling back to 6.5.4, which is really unfortunate. Nothing about 10.0 works for me in Windows 10.

    Reply
    1. Kyle RuddyKyle Ruddy Post author

      Ensure your antivirus isn’t blocking the install. 95% of the time with these issues, AV is blocking the DLL.

      Outside of that, feel free to open a support ticket.

      Reply
  16. Evans Conforti

    Issues, Issues, Issue! First the Install-Module -Name VMware.PowerCLI -Scope CurrentUser does not install all modules! I just get
    VMware.VimAutomation.Cis.Core
    VMware.VimAutomation.Common
    VMware.VimAutomation.Sdk
    Second issue is why -scope current user? This just installs the module for one user (.\Documents\WindowsPowerShell\Modules). Can we use allusers, so it installs to C:\Program Files\WindowsPowerShell\Modules?

    Reply
    1. Kyle RuddyKyle Ruddy Post author

      There may have been an issue with the PowerShell Gallery if that’s all you received. Remove the modules (Get-Module VMware.* -ListAvailable | Uninstall-Module OR delete the module folders from your $PSHome directory) and attempt the install again.

      Second part, certainly. You just need to open your PowerShell session as administrator first.

      Reply
  17. _nd345

    In Linux, i had to sudo pwsh in order to install powerCLI. Does anyone know what would have been more proper? (usergroup or something?)

    Reply
    1. Kyle RuddyKyle Ruddy Post author

      Did you happen to add “-Scope CurrentUser” to the command?

      Having to sudo means you probably installed PowerCLI for all users on that system.

      Reply
      1. _nd345

        i would indeed want it for all users, but moreover, installing gave me permissions errors (that i did not record) so i was forced to sudo pwsh

        Reply
        1. _nd345

          you’re right, i purged as sudo, then tr-tried with curtentuser which worked.

          Reply
  18. Pingback: PowerCLI 10 Here | VirtualRol

  19. Doppelgrau

    Import-Module : VMware.VimAutomation.HorizonView module is not currently supported on the Core edition of PowerShell.

    Something not working on linux…

    Reply
  20. Tom Hale

    Wow. I tried to get PowerCLI 10 working on PowerShell Core on a Linux system a few weeks ago, and even tho I got it running I was unable to benefit from it because all I use PowerCLI for is Autodeploy configuration. Now, I just updated my Windows management station to PowerShell Core (because I borked something else up) and found out I can’t use PowerCLI for Autodeploy configuration there as well.

    So, the only way to manipulate Autodeploy configurations is with PowerCLI (I’m not at vSphere 6.5 yet) and VMware.ImageBuilder does not support PowerShell Core EVEN ON WINDOWS. Seems like this release could have waited until ALL the functionality was available for at least one platform.

    In my opinion, this is an Epic Fail, and makes me wish I hadn’t chosen Autodeploy at all.

    Reply
  21. Pingback: PowerCLI 10 On A Raspberry PI - Everyday Virtualization

  22. Pingback: Setting Up VMware PowerCLI 10.x – Michelle Laverick…

  23. Martin Etcheverry

    Hi guys, i have this problem , anyone has the same ?
    PS C:\Program Files\PowerShell\6-preview> Install-Module -Name VMware.PowerCLI –
    Scope CurrentUser

    Untrusted repository
    You are installing the modules from an untrusted repository. If you trust this
    repository, change its InstallationPolicy value by running the Set-PSRepository
    cmdlet. Are you sure you want to install the modules from ‘PSGallery’?
    [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
    (default is “N”):y
    PackageManagement\Install-Package : Unable to find an entry point named ‘CryptCA
    TAdminAcquireContext2’ in DLL ‘wintrust.dll’.
    At C:\program files\powershell\6-preview\Modules\PowerShellGet\1.6.0\PSModule.ps
    m1:2057 char:21
    + … $null = PackageManagement\Install-Package @PSBoundParameters
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (Microsoft.Power….InstallPackage:Insta
    llPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : System.EntryPointNotFoundException,Microsoft.PowerShel
    l.Commands.TestFileCatalogCommand,Microsoft.PowerShell.PackageManagement.Cmdlets
    .InstallPackage

    Reply
  24. Pingback: New Release: VMware PowerCLI 10.0.0 | vSphere PowerCLI Blog – BrentHumphreys.net

  25. Roberto

    I am having the same issue except only when I attempt to connect to a VCSA 6 server. I have no issue connecting to VC 5.5

    Reply
  26. Pingback: VMware virtual machine inventory script | Dennis' tech blog

  27. Pingback: PowerCLI 10.0.0 - Error Invalid Server Certificate - Be-Virtual.net

  28. kannio

    welcome to this official site: pradhanmantriyojana

    Reply

Leave a Reply

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

*