VMware Cloud Community
kreifer1
Contributor
Contributor

Error Replacing ESXi SSL Certificates and Key with Powercli

I'm writing a script to replace the machine ssl certificates and key on our ESXi hosts using the instructions from the link below, but I'm getting an error that I can't figure out.  I'm not finding any examples as the powercli commandlets are fairly new. Any help would be much appreciated.

vCenter and hosts are running version 7.0.3

Powercli to manage certs - https://blogs.vmware.com/PowerCLI/2022/02/managing-vsphere-certificates-with-powercli.html

Certificate formatting -  https://waynehartman.com/posts/update-ssl-certs-in-esxi-server.html

kreifer1_0-1674848314226.png

kreifer1_0-1674850639712.png

 

 

0 Kudos
1 Reply
LucD
Leadership
Leadership

Are you sure the castore.pem file is written in UTF8 format?
Perhaps try piping the result of the openssl command to a file with Out-File -Encoding utf8


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos