Home > Blogs > VMware PowerCLI Blog


New Release: PowerCLI 6.5 R1

There’s been a lot of buzz around PowerCLI lately, and we’re keeping it going! It gives me great pleasure to announce the general availability of VMware PowerCLI 6.5 Release 1!

Before diving in on all the new features, it’s worth noting that these features are all created based on feedback taken directly from the users. Please help us make the product better by letting us know what would make PowerCLI easier to use and what would make your automation tasks less painful! The PowerCLI Product Manager, Development Team and I, would like to extend a huge Thank You to the community for their great feedback and consistent drive to enhance the product.

Cmdlet Updates

The Core vSphere module has received a number of updates as well as stability and performance improvements. The most notable updates include cmdlets based around VM creation and management. The ‘Move-VM’ cmdlet now supports the ability to vMotion VMs between vCenters which is known as Cross vCenter vMotion. Performing a Cross vCenter vMotion with PowerCLI also allows the VM to traverse between separate SSO domains too! This is something not available with the GUI. The ‘New-VM cmdlet now supports configuring a VM to have a specific number of CPU cores. Then, the ‘Open-VMConsoleWindow’ has been updated to provide access to the latest and greatest version of the VMware Remote Console (VMRC). Lastly, various cmdlets have received updated views to allow access to the new vSphere 6.5 APIs!

Storage Module Updates

The PowerCLI Storage module has been a big focus on this release. A lot of functionality has been added around vSAN, VVOLs, and the handling of virtual disks. The vSAN cmdlets have been bolstered to more than a dozen cmdlets which are focused on the entire lifecycle of a vSAN cluster. The entire vSAN cluster creation process can be automated with PowerCLI as well as running tests, updating the HCL database, and much more!

  • Get-VsanClusterConfiguration
  • Get-VsanDisk
  • Get-VsanDiskGroup
  • Get-VsanFaultDomain
  • Get-VsanResyncingComponent
  • Get-VsanSpaceUsage
  • New-VsanDisk
  • New-VsanDiskGroup
  • New-VsanFaultDomain
  • Remove-VsanDisk
  • Remove-VsanDiskGroup
  • Remove-VsanFaultDomain
  • Set-VsanClusterConfiguration
  • Set-VsanFaultDomain
  • Test-VsanClusterHealth
  • Test-VsanNetworkPerformance
  • Test-VsanStoragePerformance
  • Test-VsanVMCreation
  • Update-VsanHclDatabase

vSphere 6.5 introduces a new way to handle the management of virtual disks. Instead of managing a VM’s hard disks through the VM, they can now be managed independently with new PowerCLI cmdlets. This allows the handling of a virtual disk’s lifecycle to be decoupled from the lifecycle of a VM. This adds a ton of flexibility!

  • Copy-VDisk
  • Get-VDisk
  • Move-VDisk
  • New-VDisk
  • Remove-VDisk
  • Set-VDisk

PowerCLI has been updated to include new cmdlets that allow for the automated management of the VVOL replication features which are new to vSphere 6.5. Some of the new features include finding fault domains and replication groups, syncing replication groups, as well as preparing for and starting the failover process to the target site.

  • Get-SpbmFaultDomain
  • Get-SpbmReplicationGroup
  • Get-SpbmReplicationPair
  • Start-SpbmReplicationFailover
  • Start-SpbmReplicationPrepareFailover
  • Sync-SpbmReplicationGroup

Horizon Module

A brand-new module has been included to work with VMware Horizon! This has been a long time coming and has finally been released. The module can be installed anywhere and then remotely connect to the Horizon Connection server, a huge improvement over the last offering. Speaking of improvements, the module provides access to 100% of the public API through the Connect-HVServer and Disconnect-HVServer cmdlets. Keep an eye on the PowerCLI-Examples Github repo for functions allowing you to easily work with this module and provide sample code!

Compatibility

As with all versions of PowerCLI, it’s also backwards compatible going back to vSphere 5.5!

PowerCLI and vSphere Compatibility

The Storage module is compatible with vSAN 6.0 and newer, as well as Site Recovery Manager 6.1 and newer!

PowerCLI and vSAN SRM Compatibility

Last, the Horizon module is compatible with Horizon 7.0.2.

PowerCLI and Horizon Compatibility

PowerCLI Core

As if this release wasn’t enough, PowerCLI Core also has support for the new 6.5 vSphere APIs! This ensures those core vSphere cmdlets and Views are available to other operating systems PowerCLI Core operates on as well!

More Information and Download

For more information on changes made in VMware PowerCLI 6.5 Release 1, including improvements, security enhancements, and deprecated features, see the VMware PowerCLI Change Log. For more information on specific product features, see the VMware PowerCLI 6.5 Release 1 User’s Guide. For more information on specific cmdlets, see the VMware PowerCLI 6.5 Release 1 Cmdlet Reference.

You can find the PowerCLI 6.5 Release 1 download HERE. Get it today!

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

About Kyle Ruddy

Kyle Ruddy is a Senior Technical Marketing Engineer at VMware in the Cloud Platform Business Unit. Kyle currently focuses on vSphere with Operations Management as well as all things API, SDK, and CLI. Kyle can be found blogging on VMware blogs, http://blogs.vmware.com/vSphere and http://blogs.vmware.com/PowerCLI, and his personal blog, http://www.thatcouldbeaproblem.com. You can follow Kyle on twitter as @kmruddy.

39 thoughts on “New Release: PowerCLI 6.5 R1

  1. Sunny Nair

    Does 6.5 have any other dependencies? A simple get-vm, that works on PowerCLI 6.0 does not return a result with 6.5 (Get-VM VM with name ‘xxxxxxxx’ was not found using the specified filter(s)). The same script/command works without any problems on CLI 6.0. I can use get-vmguest on 6.5 with no problems though. All 6.5 modules are loaded – I can use connect-viserver and all that stuff.

    Reply
  2. Patrick Schmidt

    I found another version issue.. before the Initialize Script was under

    C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1

    Now its here

    C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1

    So i have to EDIT all my scripts AGAIN.. 🙁

    Reply
  3. Pingback: VMware vSphere 6.5 API Object Model - The Crazy Consultant

  4. vikrant

    Wow great news ,Finally VMware has announced the general availability of VMware PowerCLI 6.5 Release 1 . This is amazing that VMware has added some new features in PowerCLI 6.5 release 1 and these features are easy to use. All the new features are really great and very important. Thanks for sharing . The way you explained each and everything about the new features are really good. Thanks once again.

    Reply
  5. Waytraveler

    Receiving this error when attempting to load each module after installing on Windows 10:

    Import-Module : Could not load file or assembly ‘log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304’ or one of its dependencies. The system cannot find the file specified.

    Reply
  6. Nasko

    Hello,

    The C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1 does not work for me.

    Looking at procmon, it doesn’t even search for that name in that directory. It checks in: C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Modules\VMware.VimAutomation.Sdk\Initialize-PowerCLIEnvironment.ps1. The documentation doesn’t say anything. Any Ideas?

    Thanks!

    Reply
      1. Nasko

        Hi Nikolay,

        Thanks for you reply.

        Yes, but that doesn’t help. According to process monitor it is not even looking there. The only place it is looking is in C:\…\VMware.VimAutomation.Sdk\.

        Reply
  7. Pingback: PowerCLI 6.5 watchout the Modules – Chris – vBlog

  8. Eric Singer

    Hi,

    I applaud what VMware already has with PowerCLI, and more so, setting an example for MS to follow. I always used to laugh that you guys had better Powershell support than Microsoft did for Hyper-V.

    That said, I’ve seen a lot of what I’ll call “advanced” things that still seem to be missing, which requires custom functions to be created. Things that we can do in the GUI, but still to this day can’t do with native PowerCLI functions. Are you guys working towards digging much deeper into what can be done via PowerCLI with VMware provided cmdlets? A few examples are below.

    1. Creating a SCSI controller for a VM without needing to first create a hard drive. This can be done in the web client, but can’t be done in powercli natively.
    2. Creating and managing DRS groups (host or VM)
    3. The ability to change a vDisks scsi controller *and* scsi port. Also being able to define a scsi port at time of creation.

    You guys had an epic foundation of cmdlets and its of course gotten better, but I’d really like to see you guys dig deeper for a lot of your existing cmdlets or create new related ones.

    Anyway, keep up the good work!

    Reply
  9. Roman Gelman

    What about Initialize-PowerCLIEnvironment_Custom.ps1 ? It is not invoked at all.
    No from here ‘C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Scripts’ and not from here ‘C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts’

    Reply
  10. Pingback: Horizon 7.0.3 and Horizon Client 4.3: The Next Step in Windows 10 Management | VMware End-User Computing Blog - VMware Blogs

  11. Pingback: VMware ออกอัพเดต Horizon 7.0.3 และ Horizon Client 4.3 ปรับปรุงการทำงานร่วมกับ Windows 10 ให้ดีขึ้น - TechTalkThai

  12. Pingback: New Release: PowerCLI 6.5 R1 – VMpro.at

  13. evileric77

    Saw a few people on here saying that they were missing some cmdlets after importing the module. I was experiencing the exact same thing: Get-VM is not recognized as the name of a cmdlet, function… blah blah blah. I was doing :> Get-Module -ListAvailable vm* | Import-Module . Random cmdlets would not be recognized as a result. However, if I did:> Import-Module vmware.vimautomation.core I had no problems with missing cmdlets. I’m not sure why that is ( too busy to investigate at this time ) but loading the specific module instead of wildcarding it worked for me.

    Reply
  14. Pingback: Automating VMware Horizon 7 with VMware PowerCLI 6.5 - VMware End-User Computing Blog - VMware Blogs

  15. Friedrich Weinmann

    Thanks for the modules, finally PowerCLI has become fully portable!

    That said, I was … a bit disappointed in what I finally got, from a purely workmanship perspective:
    – Lots of redundant Get-WhatEverCommand commands added, which grant no extra functionality over Get-Command but confuse users.
    – Steeling my prompt
    – An Installer requiring elevation for an inherently portable product
    – Steeling my prompt
    – Superfluous nested module scripts that add artificial entries to the modules loaded lsit
    – Steeling my prompt
    – Non-declared exported commands: By declaring the exported cmdlets, aliases and functions in the manifest, PowerShell doesn’t have to search the module for them. Not declaring those in manifest slows down autocomplete and Get-Help. Even after first initialization, it was a noticeable slowdown on Windows 10.
    – Steeling my prompt

    Haven’t played too much with the new toys yet, but fixing all this above took me a few hours I could instead have spent on using it.

    Btw, what license is the PowerCLI covered under? Is it ok to redistribute the fixed version or not?

    Cheers,
    Fred

    PS: Regardless of that list of grievances, I really do appreciate having a module only version, it will make live a lot easier when managing VMware on customer systems.
    PPS: Stop stealing my prompt! 😉

    Reply
  16. Pingback: Automating VMware Horizon 7 with VMware PowerCLI 6.5 - VMware End-User Computing Blog - VMware Blogs

  17. Pingback: Automating VMware Horizon 7 with VMware PowerCLI 6.5 – VMpro.at

  18. Pingback: Automating VMware Horizon 7 with VMware PowerCLI 6.5 – 247 TECH

  19. Chad Eastwood

    We had found, but not yet reported that the imagebuilder module seems to have an issue when using add-esxsoftwaredepot to add the HA agent from your vCenter…see below:
    get-module *vmware* | ft -AutoSize

    ModuleType Version Name ExportedCommands
    ———- ——- —- —————-
    Binary 6.0.0.0 VMware.DeployAutomation {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-DeployRule…}
    Binary 6.0.0.0 VMware.ImageBuilder {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-EsxImageProfile, Export-EsxImageProfile…}
    Binary 6.5.0.4624453 VMware.VimAutomation.Cis.Core {Connect-CisServer, Disconnect-CisServer, Get-CisService}
    Manifest 6.5.0.4624451 VMware.VimAutomation.Common
    Binary 6.5.0.2604913 VMware.VimAutomation.Core {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAdapter, Add-VMHost, Add-VMHostNtpServer…}
    Manifest 6.5.0.4624452 VMware.VimAutomation.Sdk Get-PSVersion
    Binary 6.5.0.4624695 VMware.VimAutomation.Vds {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, Export-VDPortGroup, Export-VDSwitch…}

    :\Users\A10081154> Add-EsxSoftwareDepot http://$VIServer/vSphere-HA-depot
    Add-EsxSoftwareDepot : Could not download from depot at http://vcenterserver.fqdn/vSphere-HA-depot/index.xml, skipping ((‘http://vcenterserver.fqdn/vSphere-HA-depot/index.xml’, ”,
    ‘file not found’))
    At line:1 char:1
    + Add-EsxSoftwareDepot http://$VIServer/vSphere-HA-depot
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : ReadError: (System.String[]:String[]) [Add-EsxSoftwareDepot], Exception
    + FullyQualifiedErrorId : ConnectDepotError,VMware.ImageBuilder.Commands.AddDepot

    This command still works from older versions of PowerCLi:
    get-pssnapin *vmware*
    Name : VMware.VimAutomation.Core
    PSVersion : 3.0
    Description : This Windows PowerShell snap-in contains Windows PowerShell cmdlets for managing vSphere.

    Name : VMware.ImageBuilder
    PSVersion : 3.0
    Description : This Windows PowerShell snap-in contains VMware ESXi Image Builder cmdlets used to generate custom images.

    Name : VMware.DeployAutomation
    PSVersion : 3.0
    Description : This Windows Powershell snap-in contains vSphere Auto Deploy related cmdlets for Rule-Based-Deployment

    Add-EsxSoftwareDepot http://$VIServer/vSphere-HA-depot

    Depot Url
    ———
    http://vcenterserver.fqdn/vSphere-HA-depot/index.xml

    Reply
  20. Chris

    I found a bug in PowerCLI 6.5 that is a bit of a time waster for me. I set my PowerShell prompt in my profile to provide me specific information. When I run the Connect-VIServer cmdlets, it wipes out my prompt and sets it to be the current folder location. Can the devs remove this bad behavior so I don’t have to waste time resetting my prompt all the time? I already checked the Set-PowerCLIConfiguration cmdlets and there is nothing in there to change it.

    Reply
      1. Chris

        Thanks Kyle! I was just coming to let everyone know that I found a “workaround” for 6.5.0. It appears that the prompt is hijacked during the module import. To get around this behavior until you get a chance to upgrade, run Import-Module with the -PassThru switch. I will upgrade to 6.5.1 very soon.

        Reply
  21. ChrisS

    Hi, I’m still struggling with this on my Server 2016 system. I previously had powercli 6.3 installed, which I have completely uninstalled.

    I have installed 6.5.1 from the gallery… when I try to run Import-Module VMware.VimAutomation.Core I get:
    PS C:\> Import-Module VMware.VimAutomation.Core
    Import-Module : Could not load file or assembly ‘log4net, Version=1.2.10.0, Culture=neutral,
    PublicKeyToken=692fbea5521e1304’ or one of its dependencies. The system cannot find the file specified.
    At line:1 char:1
    + Import-Module VMware.VimAutomation.Core
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

    I’ve looked at many posts and can’t seem to find a solution for this.
    Unfortunately reinstalling this server isn’t an option for us.

    Your help appreciated.

    ChrisS

    Reply
    1. Kyle RuddyKyle Ruddy Post author

      Chris: Sorry to hear you’re having issues.

      I would try a couple things:
      First, make sure the ‘C:\Program Files (x86)\VMware\Infrastructure\VMware PowerCLI’ directory has been deleted
      Second, delete all of the PowerCLI 6.5.1 module directories from their current location (Run the following to verify their location: Get-Module -Name VMware* -ListAvailable | select Name,ModuleBase )
      Third, perform a new download of PowerCLI 6.5.1 via: Install-Module -Name VMware.PowerCLI -Scope CurrentUser
      Fourth, if the above doesn’t work, remove the modules again. This time attempt the following: Save-Module -Name VMware.PowerCLI -Path ‘C:\Path\to\download\modules’
      Then, try importing the module manually: Import-Module C:\Path\to\download\modules\VMware.VimAutomation.Core\6.5.1.5374329\VMware.VimAutomation.Core.psd1

      Another option, if the system has antivirus, make sure it is not blocking the file.

      Reply
  22. Russ OConnor

    Anybody using VMware-PowerCLI-6.5.0-4624819 on vCenter 6.5.0.5500-5318154
    The Get-Tag command-let hangs once I’m connected to vCenter

    It could be a million things on my side.
    I’ve tried downgrading to 6.3 but then Get-Tags is buggy
    (see https://communities.vmware.com/thread/565002) So I upgraded backto 6.5 R1

    Intrested to know if I’ve leapfroged into a forward compatibility blackhole

    Reply
    1. Kyle RuddyKyle Ruddy Post author

      Russ: I’m not aware of any current issues with Get-Tag. This may actually signify a bigger issue with the inventory service where a support request could be necessary.

      Another option is to upgrade to PowerCLI 6.5.1 and try it again.

      If you do create a support request, please email me (kruddy@vmware.com) the SR number so I can follow along incase it is a PowerCLI issue.

      Reply

Leave a Reply

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

*