Error: Invalid server certificate when connecting with vCenter through PowerShell

  

Error: Invalid server certificate

 

PS C:\Users\Administrator> connect-viserver -server 192.168.1.50

connect-viserver : 6/30/2021 8:01:49 AM 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

'192.168.1.50'.

At line:1 char:1

+ connect-viserver -server 192.168.1.50

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : SecurityError: (:) [Connect-VIServer], ViSecurityNegotiationException

    + FullyQualifiedErrorId : Client20_ConnectivityServiceImpl_Reconnect_CertificateError,VMware.VimAutomation.ViCore.

   Cmdlets.Commands.ConnectVIServer



Run below command to by pass invalid Certificate

PS C:\Users\Administrator> Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$true

 

Perform operation?

Performing operation 'Update 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  UseSystemProxy  Multiple            Ignore                    True                       300

User                     Multiple            Ignore

AllUsers

 

Again run command to connect with vCenter

PS C:\Users\Administrator> connect-viserver -server 192.168.1.50

 

Name                           Port  User

----                           ----  ----

192.168.1.50                   443   VSPHERE.LOCAL\Administrator




1 comment:

  1. When your website or blog goes live for the first time, it is exciting. That is until you realize no one but you and your. wow services

    ReplyDelete

Featured Post

HPE MSA 2040 configuration step by step

HPE MSA 2040 configuration Default IP range for HP SAN storage MSA 2040 is 10.0.0.1/2 You need to connect your laptop and storage with...