I have a digital certificate that I'm using for a specific task. I need to export the details of the certificate such as the serial number and issuer to a csv file that is already on my computer using PowerShell. Please keep in mind this is a digital certificate that is not installed on my computer but was sent to me and I downloaded it.
Asked
Active
Viewed 583 times
1
-
1Please [edit] the question and show _what did you try so far_? [Read a .cer file](https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x509certificate2.-ctor?view=netcore-3.1#System_Security_Cryptography_X509Certificates_X509Certificate2__ctor_System_String_) and [working with .csv file](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/?view=powershell-7.2). – JosefZ Jan 03 '22 at 20:06
-
Run `certutil.exe -dump certificate.cer` and parse the output. – Daniel Jan 03 '22 at 20:22