Skip to content

These Powershell Scripts check on your CA if there are any Certs that are about to expire in the next 30 Days.

License

Notifications You must be signed in to change notification settings

Swaegy/Windows_CA_Notify_Expiring_Certs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Windows CA Notify about Expiring Certificates

This repository contains a collection of scripts that help keep an eye on the certificate expiration on a Windows certification authority (CA).

Usage

The scripts can be run manually.
But it is advised to automate the job with the Windows Task Scheduler.
For full coverage and to have time left to renew expiring certs, run the script via the Task Scheduler every 14 Days.
You can use the System Account for running the Script, but i advise you to an account with read right to the certificate Authority.

Script

This Script creates a csv with all certificates that will expire in the next 30 days.
After that it will create a email for each unique emailaddress specified in the certificate, with all corresponding certificates listed in the mailbody.
The Script also checks for new certificates and matches them to the expiring certs and removes those from the mail. Watch out for certificates where no emailaddress is specified, fill the $cc variable for that scenario.

You will need to fill in the following Infos into the Script:
$cc = '' # Use as fallback if the Mailaddress is not set for a certificate, '[email protected]'
$smtphost = '' # FQDN or IP of your SMTP Server or Relay, 'smtp.example.com'
$maildomain = '' # Add your Maildomain, only needed for the Senderadress which is build from the Systemname and the Maildomain, 'example.com'

License

This repository is licensed under the GNU General Public License v3.0.
For more information, see the LICENSE file.

Disclaimer

This repository is for educational and informational purposes only.
The author assumes no liability for any damages that may arise from the use of the contents of this repository.

Contributions

Contributions are always welcome! If you find an error or would like to suggest an improvement, please create an issue.

About

These Powershell Scripts check on your CA if there are any Certs that are about to expire in the next 30 Days.

Topics

Resources

License

Stars

Watchers

Forks