Error while running VMWARE POWERCLI on windows 7

Error while running VMWARE POWERCLI on windows 7

I was searching google about this, but i have found nothing which helped.

When running the shortcut on windows 7 (32 bit) you get :

C:\>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -psc "C:\PowerCLI\vim.psc1" -noe -c ". \"C:\PowerCLI\Scripts\Initialize-VIToolkitEnvironment.ps1\""
Internal Windows PowerShell error.  COM initialization failed while reading Windows PowerShell console file with error 80010106.

Ok so what i do in order to get it running properly i start manually powershell console and type 2 lines

First start your PS console : START->RUN->cmd and enter " powershell "

after this just type those 2 lines :

add-PSSnapin -name   "Vmware.vimautomation.core"
. C:\PowerCLI\Scripts\Initialize-VIToolkitEnvironment.ps1

loadpcli.jpg

You are ready to go, it's all done Smiley Wink

I hope that works for you.

Comments

This has vexed me for a while too and I have been using the above for a while.  In researching again today, I found that I couldn't initialize PowerShell with any .psc1 files.  I then found this article - http://social.technet.microsoft.com/Forums/en/winserverpowershell/thread/ecf0a798-46d5-4925-8174-4f4....

After I enabled "Store and display recently opened items in the Start menu and the taskbar" and set my "Number of recent items to display in Jump lists" to at least 4, the provided shortcuts started working.  The article uses 10 and nothing below 4 worked for me but I wouldn't assume either would necessarily be your number - experiment and see.

From my perspective, the problem seems to be squarely in Microsoft's court.

VM5

JRSSG" Excellent post! Worked perfectly for me.. Thx

Version history
Revision #:
1 of 1
Last update:
‎05-09-2011 01:48 AM
Updated by: