Hi,
I'm trying to parse xml files in a directory with the following script. For example, in the xml i have data that looks like the following called service.xml
displayName="blahblahblah"
get-childitem -Path c:\service.xml | foreach { [xml]$xml=get-content $_; if ($xml.config.service.displayname) {$xml.config.service.displayname} }
When I run the script I will get result as the following
blahblahblah
So let's say there is a windows service displayname called blahblahblah, how can i use the xml result to stop and start the service using the displayname.
Thanks,
Daniel