Contact Info

Crumbtrail » Administration » Powershell » Powershell 3.0 » ConvertTo-Xml

ConvertTo-Xml - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »


Short description
Creates an XML-based representation of an object.

ConvertTo-Xml [-InputObject] <PSObject> [-As <String>] [-Depth <Int32>] [-NoTypeInformation] [<CommonParameters>]

The ConvertTo-Xml cmdlet creates an XML-based representation of one or more Microsoft .NET Framework objects. To use th
is cmdlet, pipe one or more objects to the cmdlet, or use the InputObject parameter to specify the object.

When you pipe multiple objects to ConvertTo-XML or use the InputObject parameter to submit multiple objects, ConvertTo-
XML returns a single XML document that includes representations of all of the objects.

This cmdlet is similar to Export-Clixml except that Export-Clixml stores the resulting XML in a file. ConvertTo-XML ret
urns the XML, so you can continue to process it in Windows PowerShell.