Hi All,
I am having trouble installing PowerCLI. I have found a few threads where this problem has been brought up, but nothing I found has a conclusion.
I am running Windows 10 Pro x64 v1809.
Here is the cmdlet and the error that I am getting when running it:
install-module -Name VMware.PowerCLI -allowclobber PackageManagement\Install-Package : Unable to read file C:\Users\timh\AppData\Local\Temp\1457216093\VMware.VimAutomation.Core\net45\VMware Remote Console\gobject-2.0.dll to calculate its hash. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:Install Package) [Install-Package], Exception + FullyQualifiedErrorId : UnableToReadFileToHash,Microsoft.PowerShell.Commands.TestFil eCatalogCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Here is the result with the -verbose switch
VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the reg istered repositories. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageMa nagementProvider is 'NuGet'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.PowerCLI'' for ''. VERBOSE: Total package yield:'1' for the specified package 'VMware.PowerCLI'. VERBOSE: Performing the operation "Install-Module" on target "Version '11.4.0.14413515' of m odule 'VMware.PowerCLI'". VERBOSE: The installation scope is specified to be 'AllUsers'. VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modul es'. VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'. VERBOSE: Downloading module 'VMware.PowerCLI' with version '11.4.0.14413515' from the reposi tory 'https://www.powershellgallery.com/api/v2/'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.PowerCLI'' for ''. VERBOSE: Package 'VMware.VimAutomation.Sdk' is already installed. VERBOSE: Package 'VMware.VimAutomation.Common' is already installed. VERBOSE: Package 'VMware.Vim' is already installed. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Core'' for ''. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Srm'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Core'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.License'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Vds'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Vmc'' for ''. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Nsxt'' for ''. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.vROps'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Vds'' for ''. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.HorizonView'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Cloud'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Vds'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.DeployAutomation'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.ImageBuilder'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Core'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Storage'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.StorageUtility'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Core'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VumAutomation'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Core'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Security'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Storage'' for ''. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?i d='VMware.VimAutomation.Hcx'' for ''. VERBOSE: Package 'VMware.VimAutomation.Sdk' is already installed. VERBOSE: Package 'VMware.VimAutomation.Common' is already installed. VERBOSE: Package 'VMware.Vim' is already installed. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: Package 'VMware.VimAutomation.Cis.Core' is already installed. VERBOSE: InstallPackage' - name='VMware.VimAutomation.Core', version='11.3.0.13964826',desti nation='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: DownloadPackage' - name='VMware.VimAutomation.Core', version='11.3.0.13964826',dest ination='C:\Users\timh\AppData\Local\Temp\1457216093\VMware.VimAutomation.Core\VMware.VimAut omation.Core.nupkg', uri='https://www.powershellgallery.com/api/v2/package/VMware.VimAutomat ion.Core/11.3.0.13964826' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation. Core/11.3.0.13964826'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimA utomation.Core/11.3.0.13964826'. VERBOSE: Completed downloading 'VMware.VimAutomation.Core'. VERBOSE: Hash for package 'VMware.VimAutomation.Core' does not match hash provided from the server. VERBOSE: InstallPackageLocal' - name='VMware.VimAutomation.Core', version='11.3.0.13964826', destination='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: InstallPackage' - name='VMware.VimAutomation.Srm', version='11.2.0.12483605',destin ation='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: DownloadPackage' - name='VMware.VimAutomation.Srm', version='11.2.0.12483605',desti nation='C:\Users\timh\AppData\Local\Temp\1457216093\VMware.VimAutomation.Srm\VMware.VimAutom ation.Srm.nupkg', uri='https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation .Srm/11.2.0.12483605' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation. Srm/11.2.0.12483605'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimA utomation.Srm/11.2.0.12483605'. VERBOSE: Completed downloading 'VMware.VimAutomation.Srm'. VERBOSE: Hash for package 'VMware.VimAutomation.Srm' does not match hash provided from the s erver. VERBOSE: InstallPackageLocal' - name='VMware.VimAutomation.Srm', version='11.2.0.12483605',d estination='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: InstallPackage' - name='VMware.VimAutomation.License', version='11.3.0.13990093',de stination='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: DownloadPackage' - name='VMware.VimAutomation.License', version='11.3.0.13990093',d estination='C:\Users\timh\AppData\Local\Temp\1457216093\VMware.VimAutomation.License\VMware. VimAutomation.License.nupkg', uri='https://www.powershellgallery.com/api/v2/package/VMware.V imAutomation.License/11.3.0.13990093' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation. License/11.3.0.13990093'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimA utomation.License/11.3.0.13990093'. VERBOSE: Completed downloading 'VMware.VimAutomation.License'. VERBOSE: Hash for package 'VMware.VimAutomation.License' does not match hash provided from t he server. VERBOSE: InstallPackageLocal' - name='VMware.VimAutomation.License', version='11.3.0.1399009 3',destination='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: Found the catalog file 'VMware.VimAutomation.Core.cat' in the module 'VMware.VimAut omation.Core' contents. VERBOSE: Valid authenticode signature found in the catalog file 'VMware.VimAutomation.Core.c at' for the module 'VMware.VimAutomation.Core'. VERBOSE: Validating the 'VMware.VimAutomation.Core' module files for catalog signing using t he catalog file 'VMware.VimAutomation.Core.cat'. VERBOSE: InstallPackage' - name='VMware.VimAutomation.Vds', version='11.2.0.12483615',destin ation='C:\Users\timh\AppData\Local\Temp\1457216093' VERBOSE: DownloadPackage' - name='VMware.VimAutomation.Vds', version='11.2.0.12483615',desti nation='C:\Users\timh\AppData\Local\Temp\1457216093\VMware.VimAutomation.Vds\VMware.VimAutom ation.Vds.nupkg', uri='https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation .Vds/11.2.0.12483615' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/VMware.VimAutomation. Vds/11.2.0.12483615'. PackageManagement\Install-Package : Unable to read file C:\Users\timh\AppData\Local\Temp\1457216093\VMware.VimAutomation.Core\net45\VMware Remote Console\gobject-2.0.dll to calculate its hash. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:Install Package) [Install-Package], Exception + FullyQualifiedErrorId : UnableToReadFileToHash,Microsoft.PowerShell.Commands.TestFil eCatalogCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
When I look at the subfolder in the Temp directory (1457216093 in this instance), it does not even have a VMware.VimAutomation.Core subdirectory. Everytime I have tried running this, the non-existant subdirectory is a different one.
Yes, I am running ISE as administrator. I also tried emptying the Temp folder before installing. I also tried turning off AV before running. I am selecting Yes to All when asked for permission. I have tried it in the regular Powershell (not ISE) as well. I am using the Windows version of Powershell and I tried both x64 and x86 versions.
Apparently, it is trying to read a file in a directory that the install did not create for some reason.
Please help!
Thanks!
Tim