PowerShell
PowerShell
Get Issuer Certificate Information
See more Certificates Examples
A certificate contains information about its issuer. This example demonstrates how to get the issuer information from a certificate.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$success = $false
$cert = New-Object Chilkat.Cert
$success = $cert.LoadFromFile("qa_data/certs/sample.cer")
if ($success -eq $false) {
$($cert.LastErrorText)
exit
}
# Get issuer information:
# -----------------------------------------------------------------------
# (Not all subject fields may exist depending on the issuer certificate.)
# -----------------------------------------------------------------------
# Issuer DN (Distinguished Name, i.e. all the Issuer subject parts)
$("DN: " + $cert.IssuerDN)
# Common Subject parts:
# Issuer Common Name
$("CN: " + $cert.IssuerCN)
# Issuer Country
$("C: " + $cert.IssuerC)
# Issuer Email address
$("E: " + $cert.IssuerE)
# Issuer Locality
$("L: " + $cert.IssuerL)
# Issuer Organization
$("O: " + $cert.IssuerO)
# Issuer Organizational Unit
$("OU: " + $cert.IssuerOU)
# Issuer State
$("S: " + $cert.IssuerS)