Pulling Data from CVS

I’m attempting to parse data from this command:

certutil -view -out "RequestID, NotAFter,CommonName,Certificate Expiration Date,Certificate Template" csv 

When I try:

certutil -view -out "RequestID, NotAFter,CommonName,Certificate Expiration Date,Certificate Template" csv | Select-Object Column3

It outputs nothing. I don’t have a lot of experience working with CSV, could someone help me out? My current organization just redirects the output of this command to a .csv file and looks for the correct certs, which seems like a waste of time. So I’d like to get to a point where the .csv file only has the necessary servers in it.

certutil returns text - not objects. You would need to convert the text … something like this …

certutil -view csv  | 
    ConvertFrom-Csv | 
        Select-Object "Caller Name"

Why not to used cert: drive instead of old command.
You will get access to all cert store and get all data as object.

Thank you for your reply, the above command unfortunately didn’t output anything, however I was able to get a little further based off of your advice.

$cvs = "C:\Certs.csv"

$csv | ConvertFrom-CSV $csv -Header "blah", "blah", "blah"

I think overall it might be best to just output the issued certs to a .csv file, filter according, and then export the newly generate list to a .csv file.

Well to be completely honest I wasn’t sure if issued certs from a CA were located in the cert: location. This is the first time I’ve worked so directly with a CA server. I’ll do some research and see if this is possible.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.