Exports Microsoft .NET objects froms PowerShell to a CliXml string.
ConvertTo-CliXml [-InputObject] <PSObject>
The ConvertTo-CliXml command exports Microsoft .NET Framework objects from PowerShell to a CliXml string.
© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions
Specifies the object to be converted. Enter a variable that contains the objects, or type a command or expression that gets the objects. You can also pipe objects to ConvertTo-CliXml.
Aliases | |
---|---|
Required? | true |
Position? | 1 |
Default Value | |
Accept Pipeline Input? | true (ByValue) |
Accept Wildcard Characters? | false |
The input type is the type of the objects that you can pipe to the cmdlet.
- object
The output type is the type of the objects that the cmdlet emits.
- System.String
Help Author: Adam Najmanowicz, Michael West
PS master:\> #Convert original item to xml
PS master:\> $myCliXmlItem = Get-Item -Path master:\content\home | ConvertTo-CliXml
PS master:\> #print the CliXml
PS master:\> $myCliXmlItem
PS master:\> #print the Item converted back from CliXml
PS master:\> $myCliXmlItem | ConvertFrom-CliXml
- https://github.com/SitecorePowerShell/Console/
- ConvertFrom-CliXml
- ConvertFrom-Xml
- ConvertTo-Xml
- Export-CliXml
- Import-CliXml