Unable to import VMware powershell module

Posted on 2016-09-12
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
Question by:BCSITS
  • 5
  • 4

Expert Comment

by:Derek Schauland
ID: 41796080
What is the text of the error you are getting when adding the snapin?

Author Comment

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
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand


Expert Comment

by:Derek Schauland
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

Author Comment

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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.


Expert Comment

by:Derek Schauland
ID: 41797204
And the downloadable installer was run as an admin?

Author Comment

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.

Author Comment

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

Accepted Solution

Derek Schauland earned 500 total points
ID: 41797559
Awesome. Yep the files need to be installed before adding the snap in

Author Closing Comment

ID: 41800801
thanks for your help

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
exchange, scripts 30 74
Uninstallation of MS SQL Express on VUM, SRM and vSphere 6 52
unable to unmount datastore/ re-add host 7 20
Nano server Question 2 15
When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
A brief introduction to what I consider to be the best editor for PowerShell.
Teach the user how to install log collectors and how to configure ESXi 5.5 for remote logging Open console session and mount vCenter Server installer: Install vSphere Core Dump Collector: Install vSphere Syslog Collector: Open vSphere Client: Config…
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:

929 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now