Allow ConvertTo-Xml to emit CLIXML (the same XML format as Export-Clixml) · Issue #8311 · PowerShell/PowerShell · GitHub
Skip to content

Allow ConvertTo-Xml to emit CLIXML (the same XML format as Export-Clixml) #8311

@mklement0

Description

@mklement0

Summary of the new feature/enhancement

Follow-up from #8308 (comment), quoting @SteveL-MSFT:

Ideally, it seems like we should have had ConvertTo-Xml take a -Format parameter that supported CliXml and other xml formats rather than having this confusion between ExportTo-CliXml and ConvertTo-Xml having incompatible xml formats.

Note that the documentation is lacking, as of this writing, as it mistakenly suggests that ConvertTo-Xml is the in-memory equivalent of Export-CliXml - see MicrosoftDocs/PowerShell-Docs#3310

Update: Adding dedicated ConvertTo-CliXml and ConvertFrom-CliXml cmdlets has been requested and green-lit (#3898), though the associated PR has gone stale: #12845

In light of that, it may be better to leave ConvertTo-Xml alone and simply fix / amend its documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    First-Time-IssueEasy issues first time contributors can work on to learn about this projectHacktoberfestPotential candidate to participate in HacktoberfestUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions