title: How can I update the value for a XML node using PowerShell?
body: <p>How can I change the value of the node 
  <code>&lt;Test&gt;<b>Test</b>&lt;/Test&gt;</code> to
  <code>&lt;Test&gt;<b>Power</b>&lt;/Test&gt;</code>?</p>
  
  <p><strong>Example</strong>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
      &lt;appSettings&gt;
          &lt;add key="DeploymentDate" value="test" /&gt;
          &lt;add key="DateOfInitialization" value="Vinoj" /&gt;
      &lt;/appSettings&gt;
      &lt;Test&gt;Test&lt;/Test&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Here's the PowerShell script I currently use:</p>
  
  <pre class="lang-cs prettyprint-override"><code>$configuration = "app.config"
  [xml]$xml = New-Object XML
  $xml.Load($configuration)
  $xml.selectnodes("/configuration/Test") = {"UST"}
  $xml.Save($configuration)
  </code></pre>