I am using -replace
to change a line in a .txt file from powershell, only it gives me an error because the current line and the final line go inside " ", as I should put it, thanks.
get-content $FileA | foreach-object {$_ -replace "# - "ws://127.0.0.1:8081"", "- " ws://1.1.1.1:8081"" }| set-content $FileB
Using the backtick ` character you can escape double quotes
Although sometimes it's time to use backslash + backtick since PowerShell 5, I'm not sure if this is the case