Created
December 17, 2021 19:35
-
-
Save seyerj/4c56bb4c585030ea6737955c89c91a43 to your computer and use it in GitHub Desktop.
Powershell pulls all expired certs from local server and dumps into C:\temp\expiredcerts.htm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem cert:\ -Recurse | Where-Object {$_ -is [System.Security.Cryptography.X509Certificates.X509Certificate2] -and $_.NotAfter -lt (Get-Date)} | Select-Object -Property FriendlyName,NotAfter | ConvertTo-Html | Set-Content C:\Temp\ExpiredCerts.htm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment