Email Alert when a certificate is set to expire soon

Powershell
So I needed a script that I could run as a scheduled task that would alert me if there were any certificates that were due to expire soon from our servers. Some of our web servers will need their certificates renewing in the future that can't be auto-renewed so thought this was the best time to put something in place to automatically alert the team when a certificate is due to expire and so action can be made ahead of time instead of when it happens. I adapted my script  from the following blog article here, found that the script was buggy and would stall if a server was offline or if there was an issue with invoking the command remotely so I had introduced an if statement first to…
Read More