A. Comma-separated value (CSV) files offer a simple, flat way to represent an object in text. They're also easily imported into other tools, like Microsoft Access or Microsoft Excel. They don't, however, do a good job of representing hierarchical data. For example, if you run the command
Get-Service | Export-CSV services.csv
open the services.csv file in Excel, and look at the DependentServices column, you'll see what I mean. XML, however, is excellent at representing hierarchical data:
Get-Service | Export-CliXML services.xml
The resulting file is somewhat harder to read for a human, but try opening it in Internet Explorer and you'll see what I mean.
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.