PS
Powershell Tutorial Online

Powershell String Replace

Find and replace on several strings of text in the text file.


(Get-ChildItem "C:\powershell-scripts\test1.txt" -recurse).FullName |
  Foreach-Object {
   (Get-Content $_ -Raw).
     Replace('oldtest','newtext').
     Replace('UserName=olduser','UserName=newuser').
     Set-Content $_
  }


Tutorials