Today one of my colleague had below issue while accessing Powercli, He was able to connect to vcenter, but after executing any command he was getting Proxy Authentication. 2 months back I had faced same issue Connect-VIserver Could not connect using the requested protocol. and same solution apply to this problem.
################################################################################
Get-VM : 12/21/2015 7:04:05 PM Get-VM The remote server returned an error: (407) Proxy Authentication
Required.
At line:1 char:1
+ Get-VM
+ ~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VM], ViError
+ FullyQualifiedErrorId : Client20_QueryServiceImpl_RetrievePropertiesEx_ViError,VMware.VimAutomation.ViCore.Cmdle
ts.Commands.GetVM
################################################################################
This is how I troubleshooted issue.
################################################################################
Get-VM : 12/21/2015 7:04:05 PM Get-VM The remote server returned an error: (407) Proxy Authentication
Required.
At line:1 char:1
+ Get-VM
+ ~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VM], ViError
+ FullyQualifiedErrorId : Client20_QueryServiceImpl_RetrievePropertiesEx_ViError,VMware.VimAutomation.ViCore.Cmdle
ts.Commands.GetVM
################################################################################
This is how I troubleshooted issue.
- I executed command Get-VM,
- But received error -The remote server returned an error: (407) Proxy Authentication
- I checked my status whether i am connected to vcenter using $Global:DefaultVIServer.
- It was connected, Name is the IP address of my vCenter.
- Next I checked Get-PowerCLIConfiguration
- I found ProxyPolicy is set to UseSystemProxy for Session scope. and it is using my proxy to connect to vCenter.
- I change the proxy policy to NoProxy for Session Scope using Set-PowerCLIConfiguration -Scope Session -ProxyPolicy NoProxy
- Press Y to confirmation on changing settings
- Once the changes done, You will see changed result.
- This is the last one, I checked Get-VM and without any issue I got my results on the console.
No comments:
Post a Comment