PowerCLI: Connect-VIServer Certificate Errors

KB ID 0001603


When attempting to connect to a vCenter or ESXi host, you see the following error;

Connect-VIServer certificate error 

Connect-VIServer : {Date} {Time}  Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration 
to set the value for the InvalidCertificateAction option to Prompt if you'd like to connect once or to add a 
permanent exception for this server.
Additional Information: Could not establish trust relationship for the SSL/TLS secure channel with authority
At line:1 char:1
+ Connect-VIServer
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [Connect-VIServer], ViSecurityNegotiationException
    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_CertificateError,VMware.VimAutomation.ViCore.


Well you can either ‘Sort out your certificates properly, or ‘Drag down the self signed certificate and install it‘, or simply execute the following command;

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

PowerCLI Certificate Errors

Try again.

Related Articles, References, Credits, or External Links


Author: PeteLong

Share This Post On

Submit a Comment

Your email address will not be published. Required fields are marked *