Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3351
  • Last Modified:

Unable to import VMware powershell module

Hi All,

I am trying to import VMware modules into my local PC's powershell but when i run "Add-PSSnapin VMware.VimAutomation.Core" it comes back with an error.

I have VMware vpshere client installed but not PowerCLI.  

Can anyone please tell me where i can import vmware modules from?

I am running Windows 7 with PS ver. 3.0

Thanks in advance
0
BCSITS
Asked:
BCSITS
  • 5
  • 4
1 Solution
 
Derek Schauland (Microsoft MVP)IT ConsultantCommented:
What is the text of the error you are getting when adding the snapin?
0
 
BCSITSAuthor Commented:
Hi Derek,  here is the output:

Import-Module : The specified module 'vmware.vimautomation.core' was not loaded because no valid module file was found
in any module directory.
At line:1 char:1
+ Import-Module vmware.vimautomation.core
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (vmware.vimautomation.core:String) [Import-Module], FileNotFoundExc
   eption
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Thanks,
0
 
Derek Schauland (Microsoft MVP)IT ConsultantCommented:
I think the VMware cmdlets are still provided in a snap in which requires add-pssnapin to be used rather than import-module

An example can be found here http://wannemacher.us/?p=341
0
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
BCSITSAuthor Commented:
Here is the same error message when i try Add-PSSAnapin vmware.vimautomation.core

Add-PSSnapin : The Windows PowerShell snap-in 'vmware.vimautomation.core' is not installed on this computer.
At line:1 char:1
+ Add-PSSnapin vmware.vimautomation.core
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (vmware.vimautomation.core:String) [Add-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand
0
 
Derek Schauland (Microsoft MVP)IT ConsultantCommented:
And the downloadable installer was run as an admin?
0
 
BCSITSAuthor Commented:
do you mean for the vsphere client?  if so, then yes.  powercli is not installed on my machine though.  does it need to be?

i am running powershell as admin too.
0
 
BCSITSAuthor Commented:
i have installed PowerCLI on my machine and i am now able to add the required snapin.
0
 
Derek Schauland (Microsoft MVP)IT ConsultantCommented:
Awesome. Yep the files need to be installed before adding the snap in
0
 
BCSITSAuthor Commented:
thanks for your help
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now