title: Replace multiple strings in a file using powershell
body: <p>I am using following coe to replace the string</p>
  
  <pre><code>$folders=Get-ChildItem -Path "C:\temp\Database Scripts"
  foreach($folder in $folders)
  {
      Write-Host $folder
      $spath=[string]::Concat("C:\temp\Database Scripts\", $folder)
      $subfolders=Get-ChildItem $spath 
      foreach($subfolder in $subfolders )
      {
          if($subfolder -match "Running Scripts")
          {
              $subfolerpath=[string]::Concat($spath,"\",$subfolder,"\*")  
              $files =get-childitem -Path $subfolerpath -include "AVEVAScripts*"
              if($files -ne $null)
              {
                  foreach( $file in $files)
                  {
                  Write-Host $file;
                  (Get-Content $file) | ForEach-Object {$_ -replace "DATABASE_USER","fhghjgj" `
                  -replace "DATABASE_PASSWORD", "DFGHFHJGJH"  } |Set-Content $file 
                  }
              }
          }       
      }
  }
  </code></pre>
  
  <p>But ending up with following error.</p>
  
  <p>Set-Content : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.</p>
  
  <p>Please help :)</p>