title: Powershell Error: Method invocation...doesn't contain a method named 'replace'
body: <p>I want to search and replace a string in an xml file using PowerShell.
  I tried this:</p>
  
  <pre><code>(gc d:\test.xml).replace('1234','xxxx')|sc d:\test.xml
  </code></pre>
  
  <p>This works fine for my test.xml file. The content of my test.xml file is:</p>
  
  <blockquote>
    <p>uehjduehduhfeuf xxxxxxxx hallo "1234"</p>
  </blockquote>
  
  <p>But that file is only for testing. I want to edit a server.xml form my tomcat server in this way and if I'm using exactly the same command mentioned obove I get this error message:</p>
  
  <blockquote>
    <p>Method invocation failed because [System.Object[]] doesn't contain a
    method named 'replace'.</p>
  </blockquote>
  
  <p>Does anybody know what's the problem?</p>