PowerShell - How to add newline to string or variable? - ShellGeek PowerShell - How to add newline to string or variable? - ShellGeek Using carriage return `r, newline `n, add PowerShell new line to string output.use `n to add newline to variable with PowerShell.`r`n to add shellgeek.com > "1 2 3".Replace(" ","`n") 1 2 3