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

Change vSphere PowerCLI proxy settings

(2011-05-10 04:30:40)
标签:

杂谈

分类: 工作

02月 22, 2011

Today I was performing a report in the vSphere cluster I have in my laptop and when I tried to connect to the vCenter Server with PowerCLI I got no response at all.

—-

[vSphere PowerCLI] C:\VMScripts> .\VMCheck1.ps1 10.10.15.10

10:38:10 AM Connecting to VI Server

[vSphere PowerCLI] C:\VMScripts>

—-

My first thought after that was to check network connectivity and the firewall configuration of the vCenter Server but everything was OK. Then after a quick search in the VMware Communities I found the solution in this post.

The problem was the proxy server configuration of PowerCLI, I use to do everything directly from the vCenter desktop, where I have installed PowerCLI and the vSphere Client, but this time I tried to connect directly from my laptop and since I was connected to the corporate network PowerCLI was trying to connect through the proxy server. Following is how I fixed this thanks to the above VMTN post.

First retrieve the PowerCLI proxy configuration with the Get-PowerCLIConfiguration cmdlet.

—-

[vSphere PowerCLI] % Get-PowerCLIConfiguration

Proxy Policy    Default Server

                Mode        

————    —————

UseSystemProxy  Multiple   

—-

As you can see Proxy Policy is set to UseSystemProxy. To set this value to NoProxy use the cmdlet Set-PowerCLIConfiguration.

—-

[vSphere PowerCLI] % Set-PowerCLIConfiguration -ProxyPolicy NoProxy

Perform operation?

Performing operation ‘Update vSphere PowerCLI configuration.’?

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is “Y”): y

Proxy Policy    Default Server

                Mode        

————    —————

NoProxy         Multiple     

—–

Now try to reconnect to the vCenter Server and everything should go without errors.

—-

[vSphere PowerCLI] C:\VMScripts> .\VMCheck1.ps1 10.10.15.10

10:59:42 AM Connecting to VI Server

WARNING: There were one or more problems with the server certificate:

* The certificate’s CN name does not match the passed value.

10:59:57 AM Collecting VM Objects

 

0

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

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

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

新浪公司 版权所有