[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4105
  • 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

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