18/08/2019 · Powershell - Read XML File. Advertisements. Previous Page. Next Page. Cmdlet. Get-Content cmdlet is used to read content of a xml file. In this example, we're reading content of test.xml. Get-Content D:\temp\test\test.xml Output. You can see following output in PowerShell console. 13/09/2012 · Summary: Use the [xml] type accelerator to greatly simplify reading XML documents. How can I easily read an XML file? Use the [XML] type accelerator to convert results from Get-Content into an XML document, and then use dotted notation to access the nodes. Take Control of CSV and XML Files. CSV and XML text files are both extremely common data interchange formats. PowerShell's designers provided some exceptionally powerful and easy-to-use cmdlets to help you import and export both of these formats. Thankfully, manually parsing CSV and XML files is now a thing of the past.
Working with the PowerShell pipeline; Working with XML Files; Accessing an XML File; Adding snippits of XML to current XMLDocument; Creating an XML Document using XmlWriter PowerShell Accessing an XML File Example