Fixing the Invalid Certificate on PowerCLI

I have recently been working on a fair bit of PowerCLI for a Cyber Defense competition called NECCDC. Every time, when I connect to vCenter, I receive this following error.CertError

This error occurs when the default VMWare certificates are not replaced with trusted/matching ones.

To resolve this, you need to run the following command.

 Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

This command will ignore all invalid certs from your vCenter server. It is equivalent to clicking “Install this certificate and do not display any security warning” from the old vSphere Client.

Certificate-Error-vSphere-Client-5-

(Photo from https://www.itzgeek.com/how-tos/virtualization/how-to-install-vsphere-client-5-step-by-step.html)

With this command set, you can not connect to your  vCenter server and in this case, listing out the currently configured port groups.

NoCertError

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s