There are many online tools to check the SSL certificate info. "https://woshub.com/" This was just an example. MaxIdleTime : 100000 Command: Code: keytool -list -v -keystore cas_truststore.jks. Group Policy Management in Active Directory, Security Tab Missing from File/Folder Properties in Windows, Export-CSV: Output Data to CSV File Using PowerShell, Find and Remove Locks in Microsoft SQL Server. If the thumbprint is not known to you, we can use the friendly name. David is a Cloud & DevOps Enthusiast. *****.com/ certificate expires in 26 days [11/22/2020 13:29:54]. How to check if running in Cygwin, Mac or Linux? To create a threshold, I used the (Get-date).AddDays () method to specify a later date so that I could determine if the expiration date of a certificate is imminent. .xml, .xlsx, .docx, .pdf and event more). Your email address will not be published. For this I've initialized $Subj array by setting CN field to filename: SSL-cert-check is a free and open-source shell script that you can run from cron to report on expiring SSL certificates. The script retrieves the expiration dates of certificates accessible to all users on the device using the Get-Childitem cmdlet. Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? SSL Certification Expiration Checker. Write-Host Check $site -f Green It displays all certificates that expire in less than 14 days or that have already expired. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. D:\crt.ps1:17 : 1 Ive tried changing the location to several different files/folders. Windows ships with expired certificates because certain executables that have been signed with a certificate, but have not been resigned with a new certificate, need the old certificate to ensure the validity of the certificate. We had above things to be considered in preparing something as a quick fix to the problem they experienced and there is a plan to make this solution better with time (I will share this in time to come). PS7 > .\CertificateScanner.ps1 -FilePath C:\Users\sitelist.txt We will share 4 ways to check the SSL Certificate Expiration date. The following command returns certificates that have an expiration date that is before 75 days in the future. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. $result+=New-Object -TypeName PSObject -Property ([ordered]@{ I chose every minute to test the script and understand that WLSDM . notBefore=Aug 16 01:37:02 2021 GMT ', $CCAddress = 'emailaddress@domainname.com', Send-MailMessage -From $FromAddress -To $ToAddress -Cc $CCAddress -Subject $MessageSubject -Body $Emailbody -BodyAsHtml -SmtpServer $SendingServer -Port $SmtpServerPort, # --------------------------------------------------,