Export-Clixml exports members of a collection, not the collection itself - by BigBadJogr

Status : 

 


1
1
Sign in
to vote
ID 780578 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 3/4/2013 6:43:11 AM
Access Restriction Public

Description

When exporting an arraylist via Export-Clixml, the resulting xml file only contains the description of members of the arraylist. The collection type is lost during exportation.
Sign in to post a comment.
Posted by Bartek Bielawski on 5/31/2013 at 12:49 PM
That's how *all* collections behave when piped to another cmdlet. Export-Clixml will never see your arraylist.
If you want to have it in resulting XML you can:
* use unary comma: , $col | Export-Clixml
* use -InputObject parameter: Export-Clixml -InputObject $col