Script to check Digital Certificates Expiration

Hi All, I have certificates that are being used in my current Project and all the Certificates are of extension ( .pfx - Identities , .cert - trusted certificates etc). All these certificates will expire in some other time. Can someone help me out in providing a script that is used to check the Certificate expiry date and send me an email one week in advance saying that an certificate is getting expired. Hope everyone understood my requirement and hoping you all help me out in getting this done, Thanks and support for all of your help. Regards, Srinivas