For want of a proper sed, the PS way:
Get-ChildItem -exclude *bak | Where-Object {$_.Attributes -ne “Directory”} | ForEach-Object { Copy-Item $_ “$($_).bak”; (Get-Content -Encoding UTF8 $_) -replace “some text”,”other text” | Set-Content -Encoding UTF8 -path $_ }