A. You can, but the CSV file will contain the output of the Format-Table cmdlet, which probably isn't what you want. Format cmdlets produce objects that tell the shell how to construct an on-screen display, which is why this produces such ugly output, as this example shows:
Get-Process | Format-Table | Export-CSV procs.csv
Generally, a Format cmdlet should be the LAST thing on your command line. The only exceptions are Out-File, Out-Host, and Out-Printer, which understand the output of a Format cmdlet. These cmdlets work fine, as this code shows:
Get-Process | Format-Table | Out-File procs.txt
If you want processes in a CSV file, just skip the table:
Get-Process | Export-CSV procs.csv
Do you have a Windows PowerShell question? Why not submit it to Don? Post your question at www.windowsitpro.com/FAQs/FAQSubmittalForm.aspx and you might see your answer online! Find more PowerShell FAQs, articles, and other resources at windowsitpro.com/go/DonJonesPowerShell.