title: Open and save an xml config file with powershell
body: <p>I am trying to create a script to modify the content of a config file, save it and launch the associated program. The file is apparently an xml file and with the script I created I save it in a normal text file. That might be the reason why my program won't start anymore. So how can I save in xml ?</p>
  
  <p>Here is the script:</p>
  
  <pre><code>$content = [XML](Get-Content("path\file.config"))
  $content = $content.replace("IP address","Other IP address")
  $content | out-file "path\file.config"
  </code></pre>
  
  <p>Thanks in advance</p>
  
  <p>Ben</p>