Friday, 10 February 2023

PowerTip: New Lines with PowerShell

 

PowerTip: New Lines with PowerShell

 

Hey, Scripting Guy! Question How can I use Windows PowerShell to add a new line between lines for my text output?

Hey, Scripting Guy! Answer Use the `n character, for example:

PS C:\> "string with new line `n in it"

string with new line

 in it

Note  If you need a carriage return, use `r. For a carriage return and a new line, use `r`n.

 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive