You might want to just use the certificate provider:
http://technet.microsoft.com/en-us/...47615.aspxFor example, this would give you the subject name and expiration date for the certificates in the local machine store:
gci cert:\LocalMachine\My | select subject,notafter