This script grads a list of web sites you place in a file called "serverslist.txt" which should exist in the same directory as the PowerShell script. It takes the web sites and queries them for there certificate information. Any sites that have a certificate that expires in 30 days or less are reported on. The report consist of an email sent using Send-MailMessage. Your going to need a mail server to route your SMTP message send through.
GitHub Link to: CertCheckFinal.ps1