VMware Cloud Community
owz
Contributor
Contributor

connect-viserver : not recognized as a cmdlet, function, operable program, or script file.

Hi,

Could some one please help me on this one? I had a script used to working fine, and recently it started to stop working and the following is what it returned to me from the first 2 lines of the script,

PS C:\Working> Add-PSSnapin VMware.VimAutomation.Core

Add-PSSnapin : Cannot add PSSnapIn VMware.VimAutomation.Core. It is already loaded.

At line:1 char:13

+ Add-PSSnapin <<<< VMware.VimAutomation.Core

PS C:\Working>

PS C:\Working>

PS C:\Working> connect-viserver

'connect-viserver' is not recognized as a cmdlet, function, operable program, or script file.

At line:1 char:16

Do I need to re-install the vmware vi toolkit?

Thanks!

0 Kudos
4 Replies
LucD
Leadership
Leadership

The messages you are getting don't seem to say a lot.

A reinstall with the latest build seems a good option.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
owz
Contributor
Contributor

Thanks, If you don't mind , could you please let me know where I can find the latest release for vmware powershell instalation package? and what command I can use to find out what version that I have now?

0 Kudos
LucD
Leadership
Leadership

You can get your current version/build with

Get-ViToolkitVersion

And you can download the latest version from here.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
andrey_anastaso
Enthusiast
Enthusiast

Reinstalling with the latest version (as LucD suggests) sounds like the right thing to do. In earlier version of VITK, there was no Connect-VIServer. Instead, it was called Get-VIServer. So this is probably what you're observing on your system.

0 Kudos