Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

VMware PowerCLI Connect-VIserver Could not connect using the requested protocol

While working on one of the client systems, I freshly installed PowerCLI module and while connecting to VMware vCenter server I was receiving below error.

Another Error: VMware PowerCLI The remote server returned an error: (407) Proxy Authentication Required

Connect-VIServer :  6/05/2021 3:31:27 AM        Connect-VIserver          Could not connect using the requested protocol.
At line:1 char:1
+ Connect-VIServer marvel.vcloud-lab.com
+
        + CategoryInfo               : ObjectNotFound: (:) [Connect-VIserver], ViServerConnectionException
        + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_ProtocolError, VMware.VimAutomation.ViCore.Cmd
    lets.Commands.ConnectVIServer

After testing few commands I got to know PowerCLI is using UseSystemPolicy as ProxyPolicy (This is a default ProxyPolicy), with below PowerCLI cmdlet you can know and change the configuration.

1. Run this command to get the current configured proxypolicy setting: 

C:\PS>Get-PowerCLIConfiguration

Scope    ProxyPolicy     DefaultVIServerMode InvalidCertificateAction  DisplayDeprecationWarnings WebOperationTimeout
                                                                                                  Seconds
-----    -----------     ------------------- ------------------------  -------------------------- -------------------
Session  UseSystemProxy  Multiple            Ignore                    True                       300
User                     Multiple            
AllUsers                                     Ignore

Note: This output indicates that the PowerCLI is using the System Proxy

VMware vSPhere PowerCLI vCenter connect-viserver could not connect using the requested protocol get-powercliconfiguration set-powercliconfiguration proxypolicy noproxy all users session.png

2. To change this setting to not use proxy, run below command. 

Note: This error occur if you have configured Proxy Server for Internet access.

C:\PS>Set-PowerCLIConfiguration -ProxyPolicy NoProxy -Confirm
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
Scope    ProxyPolicy     DefaultVIServerMode InvalidCertificateAction  DisplayDeprecationWarnings WebOperationTimeout
                                                                                                  Seconds
-----    -----------     ------------------- ------------------------  -------------------------- -------------------
Session  NoProxy         Multiple            Ignore                    True                       300
User                     Multiple            
AllUsers NoProxy                             Ignore

Useful Articles
VMWARE VCENTER 6.5 UPGRADATION ERROR
THERE WAS ERROR CONNECTING VMWARE VSPHERE UPDATE MANAGER [VCENTER:443] DATABASE TEMPORARILY UNAVAILABLE OR HAS NETWORK PROBLEMS
WINDOWS VCENTER 6.5: VCENTER VPXD AND OTHER SERVICES MISSING OR NOT EXIST IN SERVICES.MSC
RESOLVED : ADDING VIRTUAL HARD DISK GRAYED OUT ON VIRTUAL MACHINE
VMware hot-extend was invoked with size is not supported: Virtual Machine HDD VMDK
RESOLVED : FAIL TO DEPLOY OVF TEMPLATE - TASK CANCELED BY USER
VMWare Web Client: Datastore browse files upload copy failed error

Go Back

Comment

Blog Search

Page Views

5937481

Follow me on Blogarama