Find and replace on several strings of text in the text file.
Example
(Get-ChildItem "C:\powershell-scripts\test1.txt" -recurse).FullName |
Foreach-Object {
(Get-Content $_ -Raw).
Replace('oldtest','newtext').
Replace('UserName=olduser','UserName=newuser').
Set-Content $_
}