Search code examples
xmlstringpowershellconverters

Powershell: Convert XML to String


I am searching for a way to convert a XML-Object to string.

Is there a way like $xml.toString() in Powershell?


Solution

  • You are probably looking for OuterXml.

    $xml.OuterXml should give you what you want.