Fetching Certificates with Powershell

Fetching Certificates with Powershell

Hi I'm very new to powershell , i need to fetch only issued certificates from CA server and want to export all issued certificates to csv file by using powershell but unable to find the exact command , any help would be appreciated.

i'm using this command to fetch issued certificates, but getting all certificates, how to filter only issued certificates?

certutil -view -out "RequestID,RequesterName,RequestType,NotAfter,CommonName,CertificateTemplate,SerialNumber"

1 Answer

I'd recommend looking into using the PKITools module as this module includes the ability to retrieve issued certificates with ease.

You should be able to install the module by issuing the following command:

Install-Module -Name PKITools

Once the module has been installed, it should be as simple as running the below (without Format-Table if you want to work with the returned data):

Get-IssuedCertificate | Format-Table

This will give you output similar to the below:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.