How do I remove all newlines from a string in PowerShell? How do I remove all newlines from a string in PowerShell? powershell powershell