Solved

Unable to import VMware powershell module

Posted on 2016-09-12
9
1,814 Views
Last Modified: 2016-09-15
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
Comment
Question by:BCSITS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 9
ID: 41796080
What is the text of the error you are getting when adding the snapin?
0
 

Author Comment

by:BCSITS
ID: 41797130
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
 
LVL 9
ID: 41797170
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
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 

Author Comment

by:BCSITS
ID: 41797181
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
 
LVL 9
ID: 41797204
And the downloadable installer was run as an admin?
0
 

Author Comment

by:BCSITS
ID: 41797217
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
 

Author Comment

by:BCSITS
ID: 41797238
i have installed PowerCLI on my machine and i am now able to add the required snapin.
0
 
LVL 9

Accepted Solution

by:
Derek Schauland (Microsoft MVP) earned 500 total points
ID: 41797559
Awesome. Yep the files need to be installed before adding the snap in
0
 

Author Closing Comment

by:BCSITS
ID: 41800801
thanks for your help
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article outlines why you need to choose a backup solution that protects your entire environment – including your VMware ESXi and Microsoft Hyper-V virtualization hosts – not just your virtual machines.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Teach the user how to rename, unmount, delete and upgrade VMFS datastores. Open vSphere Web Client: Rename VMFS and NFS datastores: Upgrade VMFS-3 volume to VMFS-5: Unmount VMFS datastore: Delete a VMFS datastore:
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question