加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

VSpharePowerCLi在Windows 7/2008 64位机上运行的问题

(2011-08-04 23:17:03)
标签:

it

分类: 工作

    休假回来,同事已经把VIC运行在Windows2003x86的VSphare4.0升级到了Windows2008R2-64位的VSpahe4.1。大多数的管理都没有问题,可是当我运行VSphare PowerCLi时,总是在长久的等待以后报错。因为平常运行些小的命令,也就没太注意这个问题。只是当提及要运行每个月的月报时,同事们就说要在服务器上运行,因为时间需要很长。我运行时如果时间长了就干脆把我的手提留在单位上,第二天来取结果就行了。也就默认了这帮小子说的。

 

  可这几天我必须每天带机器回家,而月报运行超过9个小时。所以不得不在服务器上面去运行了,不试不知道,一时吓一跳!PowerCli在服务器上根本运行不了!!!点开以后,经过30多分钟的等待最后报错。好嘛,又被这帮小子忽悠了。找问题吧。

 

    放了半天的狗,发现了一篇文章说:在Windows7 64位有相似的问题:

 

I run Windows 7 x64 and the issue I had is when installing the latest PowerCLi the command box flashes on the screen and then disappears. It seems the issue is related to the target line in the shortcut that is used to launch PowerCLi.

 

Below is the original line from the installation shortcut with the bold being what causes the issue:

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -psc “C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1″ -noe -c “. \”C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-VIToolkitEnvironment.ps1\”"VSpharePowerCLi在Windows <wbr>7/2008 <wbr>64位机上运行的问题

 

Below is what the line should be changed to again with the text in bold that has been change:

 

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noe -c “Add-PSSnapin VMware.VimAutomation.Core; . \”C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1\”"

 

In the above please make sure to replace ” once copied or it will not work

 

Once the line has been changed PowerCLi will launch and open without issue. All that is needed then is to set the signed scripts to run which is done by running the following command at the prompt:

set-executionpolicy remotesigned

Select ‘yes’ and type exit

Open PowerCLi again and you will be prompted with a fully functioning PowerCLi installation to start working with.

 

   

我照着这个改了,好了!这帮小子又可以吹牛睡大觉了。可是VMware是怎么推出这个程序的?这么大条虫子在里面。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有