PowerShell
PowerShell
Load PEM Format Certificate (.pem)
See more Certificates Examples
Loads a PEM format digital certificate 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/cert.pem")
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)