-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Document ConvertTo-CliXml and ConvertFrom-CliXml cmdlets #10773
Copy link
Copy link
Closed
Labels
issue-doc-ideaIssue - request for new contentIssue - request for new content
Milestone
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new
Get-Foocmdlet" instead of "New cmdlet."
Summary
We need to document ConvertTo-CliXml and ConvertFrom-CliXml cmdlets. These cmdlets were requested so we can serialize/deserialize CliXML from memory without needing to read/write from file system,
Details
Parameter Sets
ConvertTo-CliXml [-InputObject] <psobject> [-Depth <int>] [<CommonParameters>]
ConvertFrom-CliXml [-InputObject] <string> [<CommonParameters>]Example 1
Serialize to CLI XML string and deserialize to CLI XML object in memory,
> $cliXmlString = [pscustomobject]@{'hello' = 1} | ConvertTo-CliXML
> $cliXmlString
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
<Obj RefId="0">
<TN RefId="0">
<T>System.Management.Automation.PSCustomObject</T>
<T>System.Object</T>
</TN>
<MS>
<I32 N="hello">1</I32>
</MS>
</Obj>
</Objs>
> $cliXmlString | ConvertFrom-CliXml
hello
-----
1Articles
- reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-CliXml.md
- reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-CliXml.md
Related Source Pull Requests
Related Source Issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
issue-doc-ideaIssue - request for new contentIssue - request for new content