Hello,
I'll summarize this the best I can, I'm attempting to read certificates in my machines local certificate store into a csv. Specifically I am interested in getting the Extensions objects. Powershell formats this data just fine but I am lost on how to export this formated data type into a csv. Here is some code that should help enlighten my question to others.
Running Powershell Displays the data I desire in a csv -
$cert =Get-ChildItem cert:\localmachine -Recurse($cert.Extensions|Where-Object{$_.Oid.FriendlyName-eq "Key Usage"}).Format(1)
Export Powershell data is not the same, and I understand why, but not sure 'how' to get the data I desire that is formated within the powershell window -
$cert =Get-ChildItem cert:\localmachine -Recurse($cert.Extensions|Where-Object{$_.Oid.FriendlyName-eq "Key Usage"}).Format(1)|Export-Csv C:\Folder\File.csv