whorsfall
asked on
Problem with Select-XML in Powershell
Hi,
I am having trouble trying to select some XML notes under
in an xml file.
Basically I want to set a variable to be all the
MSI application objects.
I would like to be able select all of them into an array.
I am trying the following statement and it does not seem to work.
It seems my xpath might be wrong?
I have attached the XML file.
Any suggestions?
Thanks,
Ward
I am having trouble trying to select some XML notes under
in an xml file.
Basically I want to set a variable to be all the
MSI application objects.
I would like to be able select all of them into an array.
I am trying the following statement and it does not seem to work.
It seems my xpath might be wrong?
I have attached the XML file.
Any suggestions?
Thanks,
Ward
$xpath = "/GPO/Computer/ExtensionData"
[xml]$a = Get-Content .\ComputerExample.xml
$b = $a | Select-Xml -XPath $xpath
ComputerExample.xml
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your response. Do u know why the Xpath search failed?
Thanks,
Ward