Query Certificate Store for Custom Counter

Has anyone used custom counters to check if an SSL Certificate is <30 days from expiration.  We currently have a job we setup on every sql/web server we have that uses powershell to query the certificate store and compare today to expiration date and if within 30 days email us to let us know to start replacing the cert.  This feels like it would be perfect for a custom counter in spotlight.  But I haven't been able to figure out a WMI query to get the same information.  Anyone else try this?  Any way we can use powershell for custom counters?

Thanks!

Jay