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

Append to CSV in PowerShell?

$
0
0
I'd like to find a way to append to an outputted csv file in Powershell.  Out-File has too much wasted space and duplicate lines.  Here's the script I'm trying to run:

$a=Get-Content users.txt
foreach ($i in $a)
{
    get-user $i | select displayname,samaccountname | Export-Csv output.csv -notype
}


I can't seem to find anything when dealing with an input file...  Thx.

Viewing all articles
Browse latest Browse all 15028

Trending Articles



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