Check the date of a certificate from a polled URL with PowerShell

I recently setup LetsEncrypt on this blog. With all the insecure connection url bar indicators quickly becoming default on the modern browsers, this great open source project really comes through and makes securing your site with a SSL/TLS certificate easy. And of course, in the spirit of open source, the certificates are free!

As part of using LetsEncrypt, you need to automate your certificate renewals. So once I got everything setup and a cron job configured to handle the renewals, I wanted to log the date of my current certificate from a web call on my home computer.

Here is the PowerShell I used to get the certificate date information which then can be logged


  1. I was looking for a script that did this. Thanks!!

Leave a Comment