Serialization
TIP
For deserialization, see gcm -Verb Import
JSON
ps1
ls | ConverTo-JSON
ls | ConverTo-JSON > foo.json
1
2
2
XML
Powershell has a special xml format for itself called Clixml
, this is specific to powershell.
ps1
ls | Export-Clixml foo.xml
1
CSV
ps1
ls | ConverTo-Csv > foo.csv
ls | Export-Csv foo.csv
1
2
2