Exception from HRESULT: 0x80070002 | Error when importing VMware's PowerCLI Core modules
See original GitHub issueSteps to reproduce
- Download the latest PowerCLI Core packages from here: https://labs.vmware.com/flings/powercli-core
 - Extract zips into ~/.local/share/powershell/Modules/
 - Attempt to import the PowerCLI.* modules
 
➜  Modules powershell
PowerShell v6.0.0-beta.3
Copyright (C) Microsoft Corporation. All rights reserved.
PS /Users/kanecharles/.local/share/powershell/Modules> Get-Module -ListAvailable PowerCLI*
    Directory: /Users/kanecharles/.local/share/powershell/Modules
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     6.0.0.0    PowerCLI.Cis
Binary     1.21       PowerCLI.Vds
Binary     1.21       PowerCLI.ViCore                     HookGetViewAutoCompleter
PS /Users/kanecharles/.local/share/powershell/Modules> Get-Module -ListAvailable PowerCLI* | Import-Module
Import-Module : The system cannot find the file specified.
 (Exception from HRESULT: 0x80070002)
At line:1 char:1
+ Get-Module -ListAvailable PowerCLI* | Import-Module
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
Expected behavior
Modules should import successfully, as they had on an older version of Powershell Core.
Actual behavior
PS /Users/kanecharles/.local/share/powershell/Modules> Get-Module -ListAvailable PowerCLI* | Import-Module
Import-Module : The system cannot find the file specified.
 (Exception from HRESULT: 0x80070002)
At line:1 char:1
+ Get-Module -ListAvailable PowerCLI* | Import-Module
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
Environment data
> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.3
OS                             Darwin 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue Analytics
- State:
 - Created 6 years ago
 - Reactions:1
 - Comments:10 (1 by maintainers)
 
Top Results From Across the Web
Solved: Having trouble installing Power Cli
Solved: Hi Everyone, , I have successfully imported module for power cli but while checking power cli version it throws an error PS....
Read more >Installing PowerCLI - VMware Technology Network VMTN
Then I intiate, connect-viserver -server <fqdn> and i get an error...command module was found in 'VMware.VimAutomation.Core', but the module could not be loaded ......
Read more >Unable to Install PowerCLI
I've got PowershellGet updated and NuGet updated, but everytime I run Install-Module -Name Vmware.PowerCLI it gives me the following error.
Read more >Hi Guys .Could you please help me on the error i am getting
i am getting below error when i run any commands on PowerCLI /Powershell . ... (Exception from HRESULT: 0x80131515) At line:1 char:1 +...
Read more >Having issues getting install of PowerCLI working....
It looks like that module (VMware.VimAutomation.Core) is only installed in one folder ,but still doesn't seem to be loading. Instead there is an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@kanecharles92 Thanks for your report! Please move the report to #4062
@mpsmith Thanks for report! Looks as the same error.
PG works with VMWare - we should wait compatible version of the module.