title: Search and replace with PowerShell
body: <p>I'm using the below PowerShell script to search and replace, which works fine.</p>
  
  <pre><code>$files = Get-ChildItem 'E:\replacetest' -Include "*.txt" -Recurse | ? {Test-Path $_.FullName -PathType Leaf}
  
  foreach($file in $files)
  {
      $content = Get-Content $file.FullName | Out-String
      $content| Foreach-Object{$_ -replace 'hello' , 'hellonew'`
                                  -replace 'hola' , 'hellonew' } | Out-File $file.FullName -Encoding utf8
  }
  </code></pre>
  
  <p>The issue is the script also modifies the files which does not have the matching text in it. How we ignore the files that do not have the matching text?</p>