Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

PowerTip: New Lines with PowerShell

$
0
0

Summary: Create new lines with Windows 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.


Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>