Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ConvertTo-CliXml and ConvertFrom-CliXml cmdlets #10773

Open
2 tasks done
ArmaanMcleod opened this issue Jan 6, 2024 · 0 comments
Open
2 tasks done

Document ConvertTo-CliXml and ConvertFrom-CliXml cmdlets #10773

ArmaanMcleod opened this issue Jan 6, 2024 · 0 comments
Labels
hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release issue-doc-idea Issue - request for new content
Milestone

Comments

@ArmaanMcleod
Copy link

ArmaanMcleod commented Jan 6, 2024

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-Foo cmdlet" 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
-----
    1

Articles

  • 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

@ArmaanMcleod ArmaanMcleod added issue-doc-idea Issue - request for new content needs-triage Waiting - Needs triage labels Jan 6, 2024
@sdwheeler sdwheeler added hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release and removed needs-triage Waiting - Needs triage labels Jan 6, 2024
@sdwheeler sdwheeler added this to the Future milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hold-for-pr Waiting - for PR merge hold-for-release Waiting - for next release issue-doc-idea Issue - request for new content
Projects
None yet
Development

No branches or pull requests

2 participants