PowerShell
PowerShell
Load DER encoded X.509 Certificate (.cer, .crt)
See more Certificates Examples
Loads a digital certificate from a binary DER encoded X.509 Certificate (.cer, .crt) and fetches information about the cert.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
$cert = New-Object Chilkat.Cert
# LoadFromFile will load virtually any certificate format file.
# It will auto-recognize the format and load appropiately.
$success = $cert.LoadFromFile("/Users/chilkat/testData/cer/chilkat_ssl.cer")
if ($success -ne $true) {
$($cert.LastErrorText)
exit
}
# DN = "Distinguished Name"
$("SubjectDN:" + $cert.SubjectDN)
$("Common Name:" + $cert.SubjectCN)
$("Issuer Common Name:" + $cert.IssuerCN)
$("Serial Number:" + $cert.SerialNumber)