Once in a while … you need to find a certificate about to expired ..so you’ll not be Surprised things don’t work..
so what will you do to find the “About to exppired ..Certificates ?”
there’s a simply script for it , you can set a search option for the certificate by days ,years ..or already expired(-) ..as follows –
Get-Certificate Script –
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Get-ChildItem Cert:\LocalMachine\ -Recurse | Where {$_.NotAfter -lt (Get-Date).AddDays(60)} | ForEach { [pscustomobject]@{ Computername = $_.PSComputername Folder = $_.Name Subject = $_.Subject Issuer = $_.Issuer ExpiresOn = $_.NotAfter } } |
(Visited 1,791 times, 1 visits today)