Highlighted
Contributor
Contributor

Powercli failing to launch

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>

 

0 Kudos
2 Replies
Highlighted
VMware Employee
VMware Employee

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

0 Kudos
Highlighted
User Moderator
User Moderator

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

0 Kudos