Friday, January 4, 2019

Powershell array to CSV file

The easiest way to drop a Powershell array into a CSV file...

$Array | Out-File $SaveLocation -Append -Encoding Ascii

Assigning the text format is the trick - the CSV has to be in ANSI.

And just Out-File save it as a CSV

No comments:

Post a Comment