Home Dashboard Directory Help
Search

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


Status: 

Active


1
1
Sign in
to vote
Type: Bug
ID: 780578
Opened: 3/4/2013 6:43:11 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

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.
Details
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
Sign in to post a workaround.