General

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!

Comments

50 comments have been added so far

  1. 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.

  2. 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.. 🙁

  3. 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.

  4. 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.

          1. Nothing yet. I went back to the previous version and am waiting for a solution or an update.

  5. 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!

      1. 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\.

  6. 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!

  7. 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’

  8. 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.

  9. 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! 😉

  10. 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

  11. 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.

      1. 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.

  12. 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

    1. 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.

  13. 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

    1. 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.

  14. This is what I get when i try to install the powercli module on windows server 2012 r2, running powershell 5.1, I saved the module offline, imported into module path and try to import it , however, it never works, the same module files work from my windows 10 machine, any help?

    Import-Module : Could not load file or assembly ‘file:///C:\Program
    Files\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\1.0.0.5334677\log4net.dll’ or one of its dependencies.
    Operation is not supported. (Exception from HRESULT: 0x80131515)
    At line:1 char:1
    + import-module vmware.powercli
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

  15. This is what I get when i try to install the powercli module on windows server 2012 r2, running powershell 5.1, I saved the module offline, imported into module path and try to import it , however, it never works, the same module files work from my windows 10 machine, any help?

  16. Worldwide Tourists can satisfy sole target of visiting India through Indian online visa application and Urgent Travel Visa application at India Online Visa.

  17. Most email services including Yahoo comes with specific norms and guidelines to make sure that people does legitimate use of products and services. Also, it is important to secure the user’s account that comprises all the sensitive details. Here are some of the common reasons why Yahoo locks your account. Some of the reasons are multiple attempts to illegally access the account, using a Yahoo account from different locations within a short period, suspicious events taking place, incorrect POP and IMAP settings, and sending large emails that exceed the specified limit. These are some of the common reasons why Yahoo lock your account.
    https://contactforservice.com/unlock-your-locked-yahoo-account-in-simple-ways/

Leave a Reply

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