Powershell to read from text file and compare dates

Copper Contributor

I have extracted the contents of a Java keystore to a text file.
All information of the stored certificates are inside this text file.
I want to read the CN of the certificate and until when the certificate is valid.
This I want to compare against the current date, so for instance when the certificate will expire in 60 days I want to get an alert. 

How can I accomplish this?

0 Replies