question

PrabuyuvarajRavichandran-8913 avatar image
0 Votes"
PrabuyuvarajRavichandran-8913 asked RichMatheisen-8856 answered

certificate automation

Hi
We had the subordinate certificate expiry recently in the environment. Due to this most of the application and appliance not get the authentication.
To overcome the situation, management decided to do the automation (powershell script) to get the notification 30 days prior the certificate get expire. Also, they required the entire certificate list with the expire date.

Can anyone help me to get the script or the way to achieve the above statement.

Regards,
R.R.Prauyuvaraj

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered

This will get every certificate installed on the local machine:

 Get-ChildItem Cert:\ -Recurse

This will get all the certs in the local machine personal store:

 Get-ChildItem -path cert:\LocalMachine\My 

Get all the certificate installed on the local machine expiring in 30 days:

 Get-ChildItem Cert:\ -Recurse -ExpiringInDays 30
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.