February 4th, 2014

PowerTip: Create a CSV File in PowerShell

Doctor Scripto
Scripter

Summary: Learn how to easily create a CSV file in Windows PowerShell.

Hey, Scripting Guy! Question How can I create a CSV file so I can open data that I output to the Windows PowerShell console to manipulate it in Microsoft Excel?

Hey, Scripting Guy! Answer Pipe the data to the Export-CSV cmdlet and use the –NoTypeInformation switch, for example:

Get-Process | Select name, PM | export-csv -Path c:\fso\proc.csv -NoTypeInformation

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback