VMware Cloud Community
itvccops
Contributor
Contributor

Need script for proactive expiration of certificate for multiple Vcenters

Need script for proactive expiration of certificate for multiple Vcenters.  We have 200  vcenters in our  environment . We need a script that  must  check the pro active status of the certificate expiration

0 Kudos
7 Replies
LucD
Leadership
Leadership

With PowerCLI 13.1 you can use the Get-VIMachineCertificate cmdlet.

Connect to the vCenter for which you want to check the expiration date, then do

Get-VIMachineCertificate -VCenterOnly | Select Entity,NotValidAfter

 


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

itvccops
Contributor
Contributor

We have  200  vcenters  in our  environment . we  need  to a run only one script that should tell  the expiration of all VCs

Tags (1)
0 Kudos
LucD
Leadership
Leadership

Then you use a loop through all vCenters.
How would you provide the credentials to connect to each of these vCenters?


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

0 Kudos
itvccops
Contributor
Contributor

Script  should  automatically  needs  to  connect  all  the Vcenters

Tags (1)
0 Kudos
LucD
Leadership
Leadership

That can be done with pass-through authentication (SSO based) or with the use of a CLIXML file (Export-CliXMl)?


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

0 Kudos
itvccops
Contributor
Contributor

we  need  more  information here to configure  in our  environment 

Tags (1)
0 Kudos
LucD
Leadership
Leadership

And I need more information to be able to help you.

What does not work?
Any error messages?


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

0 Kudos