I am trying to figure out a way to update my web.config for different environments by updating the configSource for the appSettings element in the web.config.
Here
Im looking for a way to modify the code as well.
Here is a way you can view whats the node:
$path = 'c:\site\web.config' $PublishState = (Select-Xml -Path $path -XPath "configuration/appSettings/add[@key='PublishState']/@value").Node.'#text' $PublishState