Q. Why would I use PowerShell's CliXML format instead of CSV?

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.

 

Please or Register to post comments.

IT/Dev Connections

Las Vegas
September 30th - October 4th

Paul ThurottYou'll have the opportunity to experience:
• The Microsoft
Technology Roadmap
• Office 365 Implementation
• Hyper-V Optimizing
• Windows 8 Deployment
and much more!

Come See Paul Thurrott & Rod Trent in Person!

Early Registration Now Open

Upcoming Training

Mastering System Center 2012

During over 6 hours of training you can join John Savill from your computer as he will walk you through the key components and capabilities of System Center 2012, what’s involved in using the components, and the benefit they can bring to your environment.

Register Now

Current Issue

May 2013 - The NameTranslate object is useful when you need to translate Active Directory object names between different formats, but it's awkward to use from PowerShell. Here's a PowerShell script that eliminates the awkwardness.

CURRENT ISSUE / ARCHIVE / SUBSCRIBE

Windows Forums

Get answers to questions, share tips, and engage with the Windows Community in our Forums.