Skip to content

Powershell 7 script to check a list of urls for Certificate Expiration Dates

License

Notifications You must be signed in to change notification settings

Rocketcandy/pwsh_SSLTools

Repository files navigation

pwsh_CertificateExpirationChecker

Powershell 7 script to check a list of urls for Certificate Expiration Dates

Example of how to call it:

.\CheckForExpiredSSLCertificates.ps1 -Path "C:\Temp\check-urls.csv" -To "IT@example.com" -From "powershell@example.com" -WarningCertAgeDays 20 -CriticalCertAgeDays 10 -Subject "SSL Expiration Notice" -SMTPServer "smtp.example.com"
Below is the list of URL's we are protecting with an SSL cert and the expiration date.

URLCheck resultExpires in daysExpires onServerBusiness ApplicationOwnerIssuerWildcardDetails
https://internalapp.example.comCRITICAL-373/1/2022App Server 01Internal App 1Web TeamInternal CAExpiration date is hard coded into the spreadsheet make sure to update the spreadsheet when the certificate is updated.
https://brokenurl.example.comERRORException while checking URL https://brokenurl.example.com: Exception calling ".ctor" with "2" argument(s): "No such host is known."
https://anotherinternalapp.example.comWARNING425/20/2022App Server 01Another Internal AppWeb TeamInternal CAExpiration date is hard coded into the spreadsheet make sure to update the spreadsheet when the certificate is updated.
https://en.wikipedia.org/OKAY636/10/2022 2:44:58 AMWikipedia web serverWikipediaWeb TeamR3Yes
https://vpn.example.comOKAY3273/1/2023FirewallVPNSecurity TeamDigiCertExpiration date is hard coded into the spreadsheet make sure to update the spreadsheet when the certificate is updated.
https://example.comOKAY3413/14/2023 6:59:59 PMWeb Server 01Web SiteWeb TeamDigiCert

Edit this file to update the list that is checked:
"C:\Temp\check-urls.csv"

About

Powershell 7 script to check a list of urls for Certificate Expiration Dates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published