Jump to content
Macka2005

Reporting on expiration date of personal SSL certificates

Recommended Posts

Is there a way to generate a report to show a list of personal SSL certificates installed on agents, whether or not they are installed as a user account / computer account?

Share this post


Link to post
Share on other sites
$threshold = 90   #Number of days to look for expiring certificates
$deadline = (Get-Date).AddDays($threshold)   #Set deadline date
Dir Cert:\LocalMachine\My | foreach {
If ($_.NotAfter -le $deadline) { $_ | Select Issuer, Subject, Thumbprint, NotAfter, @{Label="Expires In (Days)";Expression={($_.NotAfter - (Get-Date)).Days}} }}

You can change the threshold to show only certificates that will expire within XX days and certificates that have already expired.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×