title: get certificate expiration date powershell
body: <p>Id like to get your ideas how would you get the remaining days for a certificate to expire.</p>
  
  <p>I need to "monitor" an specific certificate expiration and id like it to notify (email) for 30 days before it expires till its renewed.</p>
  
  <p>I can look for the cert by running:</p>
  
  <pre><code>$cert = "AAAAAAAEEEEEEEFIIIIIIIIIOOOOOOOOUUUUUUUU"
  Get-ChildItem -Path cert: -Recurse | where {$_.Thumbprint -eq $cert}
  </code></pre>
  
  <p>but how could i get the remaining days if is bellow 30.</p>
  
  <p>Any comment or helps is always appreciate it.</p>