General

New Release: PowerCLI 6.5.1

It’s PowerCLI release day and this is a significant one! This new release of PowerCLI is versioned at 6.5.1 rather than what you probably expected which would be 6.5 R2 (following on from our last release). We have made this change in order to fall in line with the best practices for being used in the PowerShell Gallery!

New Features

First and foremost, the largest update to this version of PowerCLI is regarding how the installation process has changed. As of this release, you no longer have an MSI file to download and install. You can now install PowerCLI directly from the PowerShell Gallery! This update streamlines the install process in multiple ways and allows module based features which PowerShell users will be used to from other PowerShell based additions.

For a detailed walkthrough on this new installation process, please see this blog post on Installing PowerCLI from the PowerShell Gallery.

The modules have also been updated to support the PowerShell auto-loading process. This allows PowerShell to automatically import the necessary modules in order to process the desired entered cmdlet. A good example would be to open a new PowerShell session, enter “Connect-VIServer” and then populate the parameters as you normally would. You’ll be pleasantly surprised to see the cmdlet working properly without any other input for cmdlets required.

PowerCLI cmdlet Autoload Process

The Core module has had some notable updates. We listened to the feedback and have added several new cmdlets that create, manage, and remove DRS cluster groups and VM/Host rules. The new cmdlets are as follows:

  • Get-DRSClusterGroup
  • New-DRSClusterGroup
  • Set-DRSClusterGroup
  • Remove-DRSClusterGroup
  • Get-DRSVMHostRule
  • New-DRSVMHostRule
  • Set-DRSVMHostRule
  • Remove-DRSVMHostRule

One other major change has happened to the main vSphere module (vim.automation.core module) concerning the Site Recovery Manager (SRM) cmdlets. The SRM cmdlets have been removed from the Core module and a new SRM module has been created. The new module is named VMware.VimAutomation.Srm and features updated cmdlets that enable users to interact with the API views for the SRM 6.5 API!

Speaking of APIs, there are a couple other modules which have been updated to work with the most current APIs. The vR Ops module has been updated to work with the views for the vR Ops 6.5 API. The Horizon module has also been updated to work with the views for the Horizon View 7.1 API. The Storage module has also been updated to work with the views for the latest vSAN 6.6 API.

Last, but certainly not least, the Storage module has received some tremendous updates as well. Many new cmdlets have been added to interact with vSAN’s iSCSI features. The cmdlets include managing an iSCSI initiator group and/or an iSCSI target, managing a resource’s access which are not part of the vSAN cluster, and controlling a vSAN sourced iSCSI LUN. The new cmdlets are as follows:

  • Get-VsanIscsiInitiatorGroup
  • New-VsanIscsiInitiatorGroup
  • Set-VsanIscsiInitiatorGroup
  • Remove-VsanIscsiInitiatorGroup
  • Get-VsanIscsiTarget
  • New-VsanIscsiTarget
  • Set-VsanIscsiTarget
  • Remove-VsanIscsiTarget
  • Get-VsanIscsiInitiatorGroupTargetAssociation
  • New-VsanIscsiInitiatorGroupTargetAssociation
  • Remove-VsanIscsiInitiatorGroupTargetAssociation
  • Get-VsanIscsiLun
  • New-VsanIscsiLun
  • Set-VsanIscsiLun
  • Remove-VsanIscsiLun
  • Get-VsanStat
  • Start-VsanDiskFormatUpdate
  • Get-VSANView

The Storage module has received some updates that are not vSAN related as well. The other changes are around storage policy based management (SPBM) cmdlets. These cmdlets are:

  • Start-SpbmReplicationPromote
  • Start-SpbmReplicationTestFailover
  • Stop-SpbmReplicationTestFailover

Summary

As evidenced above, PowerCLI 6.5.1 is a pretty big release. PowerCLI being available exclusively through the PowerShell Gallery allows for a streamlined process of installing PowerCLI. There have been new cmdlets added to handle the management of DRS clusters. Several modules have been updated to interact with views for the newest APIs on SRM, vR Ops, Horizon View, and vSAN. The storage module has had quite a few improvements made around the vSAN iSCSI capabilities as well as SPBM.

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

Comments

101 comments have been added so far

  1. Is there going to be a standalone PowerCLI 6.5.1 installer released as well for those of us who’s corporate firewall blocks direct installs from the PowerShell Gallery?

    I’m really looking forward to working with it, but without that, I won’t be able to.

    1. Currently we plan on blogging about offline installation instead as there’re various ways of handling it (for these types of use cases), all of them possible today and in the context of the gallery.

      The high level options get down to:
      1. Once having downloaded from the gallery to just zip all the powercli modules and xcopy them around OR
      2. Setting up an internally hosted repo (behind your firewall) where you’d publish the ‘approved’ (depending on specific local policies) bits and have it consumed internally in the same way that you would if it were in the gallery

      As I said – stay tuned for a write-up on this

      -A

      1. The Powershell Gallery looks regarding quick “Home” Installations… but for Enterprise Users / Intallations an MSI is far better.

        1. Well, that really depends on the use case. Each of these two approaches has its advantages imho. InstallShield is notoriously slow, quite buggy and often leaves undesired traces – on both the file system and the win registry. It’s also an OS-specific technology which makes it a worse longer-term choice as a unified distribution vehicle.

          Package managers on the other hand introduce nice things like addressing the unified distribution, provide finer granularity (which is good if you only use let’s say 2 out of 10 modules), means for continuous delivery, etc, but.. certainly do raise the bar wrt managing your dependency graph. Quite a few big corporations are using internally hosted package managers these days (e.g. maven and the like), so the concept is certainly not new, nor unproven to work.

          Could you provide some details around what use cases you find MSIs better suited for? It’d be good to understand what you’re trying to do and see how this can be facilitated

          Cheers,
          A

          1. When you have a Installation Package you can rollout Software predefined and preconfigured.
            If you need standardized Client or Server Installation then you already use these methods.

            The second thing is that Internetaccess with an User which can install Software is not intended.

          2. This is great if you are a home user or a work from home “vExpert” blogger. This is less than optimal for some of your real Enterprise customers that are behind proxy servers, corporate firewalls, or those of us who don’t have control over what updates are installed on our workstations.

            My workstation is running Windows 7 with PowerShell 3.0 and WMF 3.0. WMF 5.1 cannot be installed on Windows 7/2008 R2 when WMF 3.0 is installed (https://msdn.microsoft.com/en-us/powershell/wmf/5.1/install-configure). The alternative of installing the standalone PackageManagement PowerShell Modules Preview for PowerShell 3.0 is not working (see error below). My only other alternative would be to run Windows 10. Unfortunately, my company does not allow upgrading to Windows 10 yet. I’m sure this is not an uncommon situation for a large number of enterprise customers.

            PS C:\windows\system32> Find-Module -Name VMware.PowerCLI
            PackageManagement\Find-Package : No match was found for the specified search criteria and module name ‘VMware.PowerCLI’.
            At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSModule.psm1:1047 char:3
            + PackageManagement\Find-Package @PSBoundParameters | Microsoft.PowerShell.Core\ …
            + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            + CategoryInfo : ObjectNotFound: (Microsoft.Power…ets.FindPackage:FindPackage) [Find-Package], Exception
            + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.FindPackage

  2. I’m trying to get this working but after install when I do an Import-Module VMware.PowerCLI I get the following message:

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

    I’ve uninstalled any existing PowerCLI installs (and verifying the folder is removed), tried removing and re-adding the modules in every place I can think of, installing as current user and administrator but no luck. It’s almost like there’s a piece sticking around on the old uninstalled version somewhere that I can’t find 🙁

    1. Pete: Would you mind dropping me an email? kruddy at vmware dot com

      I would be curious to know what version of PowerShell and .NET you have currently installed.

      Thanks.

    2. This looks like an environment issue. Can you please provide the following info:
      – the result of: Get-Module vmware* -listavailable | select name, version
      – the string returned by $env:psmodulepath

      You can also install this ps module (http://pscx.codeplex.com/), import pscx and then ‘dir gac:’ to check whether you don’t have some gac left-overs from several releases back.

      Cheers,
      A

  3. Not providing the offline bundle seems odd. I can’t install through an online repository due to SSL intercepts. This release seems rather poor for enterprise considerations.

  4. It would sure be nive to have a MSI package as well. I realize this is a newer, more modern and flexible way of installting – but its making it quite a bit harder for me to use, due to VERY strict security regulations. Of course, I cound just stay on the previous release – but I don’t really want to. Both metods of install would be appriciated!

    1. Albert, are you having issues with the Gallery install? We’re phasing out the MSI install to fall in line with Microsoft’s standard module install methods.

  5. Another “Enterprise policy victim” here. My inet-user isn’t allowed to install software, my admin-user isn’t allowed to access the internet. MSI-installer (or at least a zip file for download) would be greatly appreciated.

  6. Still no offline bundle? Looks like we will be phasing out PowerCLI going forward. Guess that’s in line with cloud first. VMware has worked very hard to lose customers as of late.

    1. Chris: Would you mind dropping me an email – kruddy at vmware dot com?

      I’d love to find out some more information about what issues you’re having with this new release.

  7. As it relates to the new PowerShell Core 6.0, PowerCLI will not load. It works fine in the WMF version of PS, but this is the new direction MS is taking the product in – open source and cross-platform. I even tried reinstalling PowerCLI to no avail.

    PowerShell v6.0.0-beta.5
    Copyright (C) Microsoft Corporation. All rights reserved.

    WARNING: Appended Windows PowerShell PSModulePath
    PS C:\Program Files\PowerShell\6.0.0-beta.5> Import-Module VMware.PowerCLI
    Import-Module : The type initializer for ‘VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory’ threw an exception.
    At line:1 char:1
    + Import-Module VMware.PowerCLI
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (:) [Import-Module], TypeInitializationException
    + FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.Commands.ImportModuleCommand

    It throws even more if I try to import VMware.VimAutomation.Core

    1. Correct. This release is still very much a Windows-only release.

      For PowerShell Core usage, you can use the PowerCLI Core Fling: https://labs.vmware.com/flings/powercli-core
      (However, at this time, there is a known issue with it and the PowerShell beta release so you would actually need to step back to the latest PowerShell alpha release in order for it to work)

      1. Thanks for the info Kyle. I’ll wait for new updates before I start testing scripts to ensure they work across the board. I really like the new PowerCLI version – it makes reporting on and managing the environment so easy.

  8. The only reason why I installed this on my MacOS is that now powershell is supported in my personal OS (Mac) and after installing PowerCLI 6.0.0 it just throws an error:

    Connect-VIServer : The type initializer for ‘VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory’ threw an exception.
    At line:1 char:1
    + Connect-VIServer -Server vsa1.vns.local
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Connect-VIServer], TypeInitializationException
    + FullyQualifiedErrorId : System.TypeInitializationException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer

    Come on… really? why even have this stuff released if it doesn’t work in cross-platform. I build apps (usually in Go) and it works on ALL target platform out-of-the-box. This is frustrating! I guess I’ll have to go back to Python SDK.

  9. Till 6.5.0 Power CLI, VMware.Vim.dll was strong name enabled dlls. But from 6.5.1, those dll’s are not strongly named dll’s.
    In PowerShell gallery based installation also, dll’s were not strongly named.
    Unable to load those dll’s into strongly named execution binary.

    Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly ‘VMware.Vim, Version=6.5.1.378, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

    at VimClientTest.Program.Main(String[] args)

  10. Small SEO Tools Main purpose to Make Search Engine Optimization (SEO) easy. We provide simple, professional-quality SEO analysis and critical SEO monitoring for websites. By making our tools intuitive and easy to understand, we’ve helped thousands of small-business owners, webmasters and SEO professionals improve their online presence.

  11. Code Exercise will help people to know about my opinion to it solution. I will approach to find total solution like Programming, social media, website, Business development, job service, tourism, mobile, computer, internet etc.

  12. Code Exercise will help people to know about my opinion to it solution. I will approach to find total solution like Programming, social media, website, Business development, job service, tourism, mobile, computer, internet etc.

  13. India Post Gramin Dak Sevak Form
    Sarkari Results Plus Informing you that Department of Post (India Post) has announced for the new vacancy of Gramin Dak Sevak GDS Recruitment 2022 Post Online Form 2022, and the Total vacancy for this post is 38926 Of Post. The last date to apply this post is 05 /6/ 2022, the maximum age limit of this post is 40 Years, and the fee for this post is from 0 to 100 (category wise different ). All interested candidates must read the official notification before applying.
    https://sarkariresultsplus.com/india-post-gds-may22/

  14. JBN Live a digital news platform that will give you all the news of INDIA which is necessary for you. You will bring all the news related to your life which affects your life.

  15. Bias towards action. When you’re stuck, when you’re given a new piece of information, or when you’re feeling dissatisfied being in your comfort zone, take an action, however small that action may be.

Leave a Reply

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