Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Export to CSV question

$
0
0

I have what might be a somewhat unique export question but hopefully has a simple answer.

I found a custom function that will query a server's certificate store and return all the certificates, get-pkicertificates.  When I run this function against multiple servers and export it to CSV the location of each certificate is not included in the export since it's not a property of the individual certificate itself.  So what I'm looking for is a way to modify the lines below that will somehow notate in the CSV which server the certificates were exported from.

$Server = Get-ADComputer -Filter {OperatingSystem -Like "Windows Server*"}

$Server | foreach{Get-PKICertificates -computer $_.name -StoreLocation LocalMachine -StoreName My -OpenFlag ReadOnly} | export-csv certs.csv

Thanks, any help greatly appreciated!


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>