getting app.config elements in powershell
问题 config file which looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Environment" value="Dev Environment"/> </appSettings> </configuration> How can i get the value of key "Environment" in Powershell? I mean it should return "Dev Environment" when you select key "Environment". I prefer linq to use here anyone with any idea really appreciate that. 回答1: I recommend xpath. First create an XmlDocument object like this: $xml = [xml] @' <?xml version="1