Share via

certificate automation

Prabuyuvaraj Ravichandran 21 Reputation points
2021-10-07T22:16:48.23+00:00

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 for business | Windows Server | User experience | PowerShell
0 comments No comments

1 answer

Sort by: Most helpful
  1. Rich Matheisen 48,116 Reputation points
    2021-10-08T01:57:51.38+00:00

    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
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.