Please refer the script monitor, to the Procedure checks for the presence of any certificate in order to expire in next 30 days and alerts with the list of certificates that are going to be expired.
Using the alert as a PKI (Public Key Infrastructure) Admin, I can stop the service expiration on my IT environment and can have a continuous benefit on the service.
You can edit below variable on the code to increase or decrease your (30) days to check for the certificate expiration
Please refer the wiki guide for how to use the custom monitoring scripts:
Tested OS : This script has tested on Windows(7), Windows(8,8.1), Windows(10) Machines