You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running ConvertFrom-Clixml with a file that contains multiple Clixml objects - the conversion should be able to convert all objects via the pipeline.
Attempt to convert the contents of the data back into PS Object format
Context (Environment)
I have a Clixml file that contains many converted objects. I am attempting to get the contents of the file and convert them back to PowerShell object format. This is working when the file contains one Clixml entry, but not when it contains multiple.
I do currently have a work-around for this which I have shown above.
Operating System and version as reported by $PSVersionTable.OS: Microsoft Windows 10.0.18362
PowerShell versions as reported by $PSVersionTable.PSEdition: Core
Detailed Description
Based on the behavior it seems like Get-Content doesn't have a delimter available for Clixml data to properly parse it. Because of the lack of delimter the ConvertFrom-Clixml doesn't have a way to handle multiple objects.
This could be handled by introducing a delimeter of some kind when ConvertTo-Clixml is used. Alternatively, logic could be added to permit ConvertFrom-Clixml to handle multi-object conversions.
The text was updated successfully, but these errors were encountered:
Expected Behavior
When running ConvertFrom-Clixml with a file that contains multiple Clixml objects - the conversion should be able to convert all objects via the pipeline.
Current Behavior
Currently - regardless if
-Raw
is used or notConvertFrom-Clixml
is only able to convert a file if it contains a singular Clixml object.Possible Solution
Here is how I am currently working around this:
Steps to Reproduce
Get-Content
Context (Environment)
I have a Clixml file that contains many converted objects. I am attempting to get the contents of the file and convert them back to PowerShell object format. This is working when the file contains one Clixml entry, but not when it contains multiple.
I do currently have a work-around for this which I have shown above.
$PSVersionTable.OS
:Microsoft Windows 10.0.18362
$PSVersionTable.PSEdition
:Core
Detailed Description
Based on the behavior it seems like Get-Content doesn't have a delimter available for Clixml data to properly parse it. Because of the lack of delimter the
ConvertFrom-Clixml
doesn't have a way to handle multiple objects.This could be handled by introducing a delimeter of some kind when
ConvertTo-Clixml
is used. Alternatively, logic could be added to permitConvertFrom-Clixml
to handle multi-object conversions.The text was updated successfully, but these errors were encountered: