Connect-VIServer : Could not load file or assembly 'VMware.Vim, Version=7.0.0.2660, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find
the file specified.
At line:1 char:1
+ Connect-VIServer -Server xxxxx
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-VIServer], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
PSMessageDetails :
Exception : System.IO.FileNotFoundException: Could not load file or assembly 'VMware.Vim, Version=7.0.0.2660, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. The system cannot find the file specified.
File name: 'VMware.Vim, Version=7.0.0.2660, Culture=neutral, PublicKeyToken=null'
at VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer.HandleConnectError(List`1 connectExceptions)
at VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer.ProcessRecordErrorHandled()
at VMware.VimAutomation.Sdk.Util10Ps.BaseCmdlet.ErrorCallbackCmdletBase.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].TargetObject :
CategoryInfo : NotSpecified: (:) [Connect-VIServer], FileNotFoundException
FullyQualifiedErrorId : System.IO.FileNotFoundException,VMware.VimAutomation.ViCore.Cmdlets.Commands.ConnectVIServer
ErrorDetails :
InvocationInfo : System.Management.Automation.InvocationInfo
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
Get-Module -Name VMware* -ListAvailable | select Name, Version, path
VMware.VumAutomation 6.5.1.7862888 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VumAutomation\6.5.1.7862888\VMware.VumAutomation.psd1
VMware.VimAutomation.WorkloadManagement 12.0.0.15947288 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.WorkloadManagement\12.0.0.15947288\VMware.VimAutomation.WorkloadManagement.psd1
VMware.VimAutomation.vROps 12.0.0.15940184 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.vROps\12.0.0.15940184\VMware.VimAutomation.vROps.psd1
VMware.VimAutomation.Vmc 12.0.0.15947287 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Vmc\12.0.0.15947287\VMware.VimAutomation.Vmc.psd1
VMware.VimAutomation.Vds 12.0.0.15940185 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Vds\12.0.0.15940185\VMware.VimAutomation.Vds.psd1
VMware.VimAutomation.StorageUtility 1.3.0.0 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.StorageUtility\1.3.0.0\VMware.VimAutomation.StorageUtility.psd1
VMware.VimAutomation.Storage 12.0.0.15939648 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Storage\12.0.0.15939648\VMware.VimAutomation.Storage.psd1
VMware.VimAutomation.Srm 11.5.0.14899557 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Srm\11.5.0.14899557\VMware.VimAutomation.Srm.psd1
VMware.VimAutomation.Security 12.0.0.15939672 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Security\12.0.0.15939672\VMware.VimAutomation.Security.psd1
VMware.VimAutomation.Sdk 12.0.0.15939651 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\12.0.0.15939651\VMware.VimAutomation.Sdk.psd1
VMware.VimAutomation.Nsxt 12.0.0.15939671 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Nsxt\12.0.0.15939671\VMware.VimAutomation.Nsxt.psd1
VMware.VimAutomation.License 12.0.0.15939670 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.License\12.0.0.15939670\VMware.VimAutomation.License.psd1
VMware.VimAutomation.HorizonView 7.12.0.15718406 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.HorizonView\7.12.0.15718406\VMware.VimAutomation.HorizonView.psd1
VMware.VimAutomation.Hcx 12.0.0.15939647 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Hcx\12.0.0.15939647\VMware.VimAutomation.Hcx.psd1
VMware.VimAutomation.Common 12.0.0.15939652 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Common\12.0.0.15939652\VMware.VimAutomation.Common.psd1
VMware.VimAutomation.Cloud 12.0.0.15940183 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.VimAutomation.Cloud\12.0.0.15940183\VMware.VimAutomation.Cloud.psd1
VMware.Vim 7.0.0.15939650 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.Vim\7.0.0.15939650\VMware.Vim.psd1
VMware.PowerCLI 12.0.0.15947286 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.PowerCLI\12.0.0.15947286\VMware.PowerCLI.psd1
VMware.ImageBuilder 7.0.0.15902843 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.ImageBuilder\7.0.0.15902843\VMware.ImageBuilder.psd1
VMware.DeployAutomation 7.0.0.15902843 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.DeployAutomation\7.0.0.15902843\VMware.DeployAutomation.psd1
VMware.CloudServices 12.0.0.15947289 C:\Users\WAdmin\Documents\WindowsPowerShell\Modules\VMware.CloudServices\12.0.0.15947289\VMware.CloudServices.psd1
VMware.VumAutomation 6.5.1.7862888 C:\Program Files\WindowsPowerShell\Modules\VMware.VumAutomation\6.5.1.7862888\VMware.VumAutomation.psd1
VMware.VimAutomation.WorkloadManagement 12.0.0.15947288 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.WorkloadManagement\12.0.0.15947288\VMware.VimAutomation.WorkloadManagement.psd1
VMware.VimAutomation.vROps 12.0.0.15940184 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.vROps\12.0.0.15940184\VMware.VimAutomation.vROps.psd1
VMware.VimAutomation.Vmc 12.0.0.15947287 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Vmc\12.0.0.15947287\VMware.VimAutomation.Vmc.psd1
VMware.VimAutomation.Vds 12.0.0.15940185 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Vds\12.0.0.15940185\VMware.VimAutomation.Vds.psd1
VMware.VimAutomation.StorageUtility 1.3.0.0 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.StorageUtility\1.3.0.0\VMware.VimAutomation.StorageUtility.psd1
VMware.VimAutomation.Storage 12.0.0.15939648 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Storage\12.0.0.15939648\VMware.VimAutomation.Storage.psd1
VMware.VimAutomation.Srm 11.5.0.14899557 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Srm\11.5.0.14899557\VMware.VimAutomation.Srm.psd1
VMware.VimAutomation.Security 12.0.0.15939672 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Security\12.0.0.15939672\VMware.VimAutomation.Security.psd1
VMware.VimAutomation.Sdk 12.0.0.15939651 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\12.0.0.15939651\VMware.VimAutomation.Sdk.psd1
VMware.VimAutomation.Nsxt 12.0.0.15939671 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Nsxt\12.0.0.15939671\VMware.VimAutomation.Nsxt.psd1
VMware.VimAutomation.License 12.0.0.15939670 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.License\12.0.0.15939670\VMware.VimAutomation.License.psd1
VMware.VimAutomation.HorizonView 7.12.0.15718406 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.HorizonView\7.12.0.15718406\VMware.VimAutomation.HorizonView.psd1
VMware.VimAutomation.Hcx 12.0.0.15939647 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Hcx\12.0.0.15939647\VMware.VimAutomation.Hcx.psd1
VMware.VimAutomation.Core 12.0.0.15939655 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Core\12.0.0.15939655\VMware.VimAutomation.Core.psd1
VMware.VimAutomation.Common 12.0.0.15939652 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Common\12.0.0.15939652\VMware.VimAutomation.Common.psd1
VMware.VimAutomation.Cloud 12.0.0.15940183 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Cloud\12.0.0.15940183\VMware.VimAutomation.Cloud.psd1
VMware.VimAutomation.Cis.Core 12.0.0.15939657 C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Cis.Core\12.0.0.15939657\VMware.VimAutomation.Cis.Core.psd1
VMware.Vim 7.0.0.15939650 C:\Program Files\WindowsPowerShell\Modules\VMware.Vim\7.0.0.15939650\VMware.Vim.psd1
VMware.PowerCLI 12.0.0.15947286 C:\Program Files\WindowsPowerShell\Modules\VMware.PowerCLI\12.0.0.15947286\VMware.PowerCLI.psd1
VMware.ImageBuilder 7.0.0.15902843 C:\Program Files\WindowsPowerShell\Modules\VMware.ImageBuilder\7.0.0.15902843\VMware.ImageBuilder.psd1
VMware.DeployAutomation 7.0.0.15902843 C:\Program Files\WindowsPowerShell\Modules\VMware.DeployAutomation\7.0.0.15902843\VMware.DeployAutomation.psd1
VMware.CloudServices 12.0.0.15947289 C:\Program Files\WindowsPowerShell\Modules\VMware.CloudServices\12.0.0.15947289\VMware.CloudServices.psd1
Name | Value |
---- | ----- |
PSVersion | 5.1.14409.1018 |
PSEdition | Desktop |
PSCompatibleVersions | {1.0, 2.0, 3.0, 4.0...} |
BuildVersion | 10.0.14409.1018 |
CLRVersion | 4.0.30319.42000 |
WSManStackVersion | 3.0 |
PSRemotingProtocolVersion | 2.3 |
SerializationVersion | 1.1.0.1 |
PS C:\Windows\system32> Install-Module -Name VMware.Vim -Verbose
VERBOSE: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr\Microsoft.PackageManagement.NuGetProvider.dll
VERBOSE: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr\Microsoft.PackageManagement.ArchiverProviders.dll
VERBOSE: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr\Microsoft.PackageManagement.MetaProvider.PowerShell.dll
VERBOSE: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr\Microsoft.PackageManagement.CoreProviders.dll
VERBOSE: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr\Microsoft.PackageManagement.MsuProvider.dll
VERBOSE: Acquiring providers for assembly: C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.4.7\fullclr\Microsoft.PackageManagement.MsiProvider.dll
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='VMware.Vim'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'VMware.Vim'.
VERBOSE: Skipping installed module VMware.Vim 7.0.0.15939650.
PS C:\Windows\system32>
Unable to run Connect-VIServer -Server. Does anyone have a clue?
That is very strange.
Can you check if the Verbose switch gives any additional information?
Import-Module -Name PowerShellGet -Verbose
You did stop/start your PowerShell in between I guess?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I did restart the target server though.
Looks like you are missing another module, namely PackageManagement.
Can you try the manual download and the nuget procedure for that one as well?
I'm wondering what happened to that system?
It is really broken for PowerShell.
Wouldn't it be easier to just try another station?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
As you said, I manually downloaded the PowerShell Gallery | PackageManagement 1.4.7 and installed it.
I then ran the Install-Module -Name VMware.PowerCLI which seemed successful.
And we're back to square one
May be it's time I reinstalled this jump server.
That looks like a good idea.
I'm afraid that the station is completely messed up, and trying to fix it, short of a reinstall, will probably take a lot of time or fail forever.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference