Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


New line in PowerShell string

Append “`n” to the end of the string. Or use the following function

function AppendNewLine {
    $tmpData += $args[0] + $args[1]
    $tmpData += "`n"
    return $tmpData
$string += AppendNewLine "Parameter" "Value"
$string += AppendNewLine "Parameter1" "Value1"


Enter your comment:
G R Z P᠎ C
windows/scripting/ps_new_line.txt · Last modified: 2019/10/31 09:06 (external edit)