I am getting the below error while launching the powershell. It was working a couple of days ago 😞
PS C:\Users\Temp> Connect-VIServer
Connect-VIServer : The 'Connect-VIServer' command was found in the module 'VMware.VimAutomation.Core', but the module could not be loaded. For more information, run 'Import-Module VMware.VimAutomation.Core'.
At line:1 char:1
+ Connect-VIServer
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Connect-VIServer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PS C:\Users\Temp>
Hi @siprasad ,
What's the version of PowerCLI being used ?/ Launch PowerCLI directly and check if that can still run Connect-VIServer command
Please run this command from power shell: Get-Module -Name VMware* -ListAvailable | Import-Module
Hope that helps
Most of the time this indicates a faulty installation or a mix of version.
See for example Solved: The term 'Connect-VIServer' is not recognized as t... - VMware Technology Network VMTN
The best approach is to uninstall/remove everything PowerCLI and do a fresh install.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference