I understand how to get the thumbprint of a certificate that's installed to a certificate store, however I'm hoping there is a way to get that information for a certificate FILE.
So for example I'd have c:\temp\mycert.com.cer... how would I get the thumbprint from that file? Is it even possible? Google isn't being very helpful. I've been doing this in powershell as such to get this from the certificate store, but again - I need to get this info from a certificate FILE.
$certCN = mysite.com
$cert = Get-ChildItem cert:\LocalMachine\My -Recurse | where {$_.subject -like "*CN=$certCN*"} | where {$_.ExpiringInDays -lt "91"}
$thumbprint = $cert.thumbprint