Avatar of IT Guy
IT Guy
Flag for United States of America asked on

Error: Invalid server certificate message while trying to logon to vSphere using PowerCLI

I'm following the instructions from the website listed below to connect to a vSphere server.

https://www.altaro.com/vmware/vmware-powercli-guide/


 Connect-VIServer -Server vsphere.company.com

Open in new window


However, after entering the root username and password the following error message displays:


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


What is the process to remedy this issue so I will be able to log on to the vSphere server using PowerCLI?


Error screenshot:


vSphereVMware* PowerCLIPowershell* vmware vcenters

Avatar of undefined
Last Comment
IT Guy

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Richard Faulkner

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
IT Guy

ASKER
Richard,

Thank you for your feedback.

I'm in the process of getting a certificate for our organization's vSphere.
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

You can generate your own FREE certificates with your own internal Certificate Authority

Because you will need to do all hosts and vCenter Server

You then just trust that internal CA in your orgsnisation
IT Guy

ASKER
Can you provide me with step-by-step instructions on how to generate my own FREE certificates with my own internal Certificate Authority?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)

Please note this is quite involved, and the first thing you need is a Microsoft CA, so I would recommend you open a new question, as it's out of scope of this question and myself or other Expert can assist you with this.
IT Guy

ASKER
Please see my other question Instructions on how to generate certificate with Internal Certificate Authority for vSphere to provide me with step-by-step instructions on how to generate a certificate with my organization's Internal Certificate Authority for vSphere.