In a PowerShell script, I\'m capturing the string output of an EXE file in a variable, then concatenating it with some other text to build an email body.
However, w
Or you could simply set $OFS like so:
PS> $msg = 'a','b','c' PS> "hi $msg" hi a b c PS> $OFS = "`r`n" PS> "hi $msg" hi a b c
From man about_preference_variables:
man about_preference_variables
Output Field Separator. Specifies the character that separates the elements of an array when the array is converted to a string.