XML ChildNode retrieve value

I’m looking through some GPO settings using Get-GPOReport with the ReportType of Xml. The setting I’m looking at is on the Computer Configuration > Preferences > Windows Settings > Files.

[xml]$ReferenceGPOReport=Get-GPOReport -Guid $ReferenceGPOId -ReportType Xml

$q1=$ReferenceGPO | Where-Object {$_.q1}
$q1.ChildNodes.ChildNodes | Select-Object -Property *

When I see the ChildNodes property, I see these values:

ChildNodes : {q1:GPOSettingOrder, q1:Properties, q1:Filters}

But when I try to access the values, I only get :


I tried to look at the members and going through the properties to see if I could retrieve the information, but I couldn’t. I might be able to do it in a string, but I’m sure there’s another way to get that information. Any body know how?

It’s difficult to assist without seeing the actual schema of the XML and what exactly you are attempting to get, but if you are selecting a node q1, why not just continue with dot notation.


Normally, you can just keep using intellisense to continue to get to the node you want to see. If you do want to post XML, you may need to do https://gist.github.com/

Surprising I actually found the answer.


I actually found the answer by doing this:

$q1.ChildNodes.ChildNOdes.ChildNodes | Select-Object -Property *