Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Variable Output in Email

$
0
0

Thanks for the correction Dave. Also, you should take a look at here-strings if you are going to be compiling a message to the user for ease of formatting:

$managername = Get-ADUser jsmith | Select name
 
$body = @"
 Dearest $($managername.name),
 
 Some message blah blah blah
 
 Your technically apt IT God,
 
 Frank
 
"@
 
$body

Only catch is here-strings are picky with indentation and line breaks, but it's much easy to format and read large amounts of text.


Viewing all articles
Browse latest Browse all 13067