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 $_ }