„NoNewLine“-ParameterNoNewLine parameter

Out-File, Add-Content und Set-Content haben nun den neuen Schalter –NoNewline, der einfach eine neue Zeile hinter der Ausgabe weglässt.Out-File, Add-Content, and Set-Content now have a new –NoNewline switch which simply omits a new line after the output.

PS C:\> "This is " | Out-File -FilePath Example.txt -NoNewline

PS C:\>; "a single " | Add-Content -Path Example.txt -NoNewline

PS C:\> "sentence." | Add-Content -Path Example.txt -NoNewline

PS C:\> Get-Content .\Example.txt

This is a single sentence.

Ohne Angabe von –NoNewline befindet sich jedes Fragment in einer getrennten Zeile:Without –NoNewline specified, each fragment would be on a separate line:

PS C:\> "This is " | Out-File -FilePath Example.txt

PS C:\> "a single " | Add-Content -Path Example.txt

PS C:\> "sentence." | Add-Content -Path Example.txt

PS C:\> Get-Content .\Example.txt

This is

a single

sentence.