Hi all;
I am using the following command to pull a list of expired certificates in powershell:
<snip>
$Today=Get-Date -Format yyyyMMdd
$ReportDir="D:\ExpiryReports"
certutil -view -restrict "RequesterName=sa-service-account,NotAfter>=now,NotAfter<=now+30:00" -out "Requester Name,CommonName,NotAfter,SerialNumber,CertificateTemplate" csv > $ReportDir\ExpirationReport_$Today.csv
</snip>
The output always contains a timestamp in the header, which makes programatic work with it difficult:
"4/6/2020 12:00 AM""5/6/2020 12:00 AM""Requester Name","Issued Common Name","Certificate Expiration Date","Serial Number","Certificate Template"
Other certutil commands I use like this to generate enrollment reports do not have this timestamp. Is there a way to get rid of it in the certutil command?