What data formats does PowerShell most easily read? What data formats does PowerShell most easily read? powershell powershell

What data formats does PowerShell most easily read?


Powershell has great support for XML data is it allows you to "dot" through an XML hierarchy. For example assume your data was in the following form

<Root>    <WebFrontEnds>        <Web1 />        <Web2 />        <Web3 />    </WebFrontEnds></Root>

It could be accessed like so

C:\Users\jaredpar> $data = [xml](gc example.xml)C:\Users\jaredpar> $data.Root.WebFrontEnds.ChildNodes | %{ $_.Name }Web1Web2Web3


Your data appears to be relational (basically three tables, Computer, Function, and a mapping table), so both XML and CSV (using the included Import-Csv and Export-Csv cmdlets) will work but will be imperfect fits. I would suggest using SQL CE.