title: How to amend a xml element text in PowerShell script
body: <p>I need to amend multiple paths in a xml file. I need to read in all the paths and then add my system information to each one. How do I read in all the paths, store them in a variable then update them. <code>$path= $newText + oldPath</code></p>
  <pre><code>&lt;monitor&gt; 
     &lt;fileProcessor&gt;
      &lt;pathConfiguration&gt;
        &lt;path&gt;/path/to/file&lt;/path&gt;
  &lt;/pathConfiguration&gt;
  &lt;/fileProcessor&gt;
  &lt;/monitor&gt;
  </code></pre>
  <pre class="lang-powershell prettyprint-override"><code>$newText= &quot;C:/users/name&quot;
  
  foreach ($element in $xmlDoc.monitor.fileProcessor.pathConfiguration.path)
  {
    $element = $newText + existingText
  }
  </code></pre>