PowerCLI

  • 1.  Error installing Powercli

    Posted Aug 11, 2023 10:51 AM

    Hi,

     

    When i try to install powercli on my computer i received the same error 

    PS C:\Users\aaaaaa> Install-Module -Name VMware.VimAutomation.Common
    Install-Package: Package 'VMware.VimAutomation.Common' failed to be installed because: End of Central Directory record could not be found.

    I've a windows 11 environtment with Powershell 5.1, and try to install Powershell 7.2.13, updating the PowershellGet and nuget package. 

    Enable powershell Gallery with a trusted InstallationPolicy, 

    When i try the -verbose option, i've the following error

    VERBOSE: InstallPackage' - name='VMware.VimAutomation.Common', version='13.1.0.21605386',destination='C:\Users\AAAA\AppData\Local\Temp\1337495816'
    VERBOSE: DownloadPackage' - name='VMware.VimAutomation.Common', version='13.1.0.21605386',destination='C:\Users\AAAA\AppData\Local\Temp\1337495816\VMware.VimAutomation.Common.13.1.0.21605386\VMware.VimAutomation.Common.13.1.0.21605386.nupkg', uri='https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Common/13.1.0.21605386'
    VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Common/13.1.0.21605386'.
    VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation.Common/13.1.0.21605386'.
    VERBOSE: Completed downloading 'VMware.VimAutomation.Common'.
    VERBOSE: Hash for package 'VMware.VimAutomation.Common' does not match hash provided from the server.

    But the error persist.

    Any idea?

     



  • 2.  RE: Error installing Powercli

    Posted Aug 11, 2023 11:41 AM

    Probably an issue with PowershellGet

    Run the following commando's in a elevated PowerShell prompt

    Install-PackageProvider Nuget –force –verbose
    Install-Module –Name PowerShellGet –Force –Verbose
    Update-Module

     



  • 3.  RE: Error installing Powercli

    Posted Aug 11, 2023 02:45 PM

    The first command report 

    Install-PackageProvider: No match was found for the specified search criteria for the provider 'Nuget'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.

    with Powershell 7.2.13



  • 4.  RE: Error installing Powercli

    Posted Aug 11, 2023 02:48 PM

    I've this

     

    --> Get-PackageProvider

    Name Version DynamicOptions
    ---- ------- --------------
    NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
    PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Includes, DscReso…



  • 5.  RE: Error installing Powercli

    Posted Jan 23, 2025 05:42 PM

    Hello, did you ever get this sorted out? Running into the same issue myself...