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

Reply To: Variable Output in Email

$
0
0

You have a couple of options. $managername is a object containing the name. So you can do either expand the property to return a string:

$managername = get-aduser $listmanager | select-object -ExpandProperty name

or reference the property as [object].property

$body ="    Dear $managername.name,"

Viewing all articles
Browse latest Browse all 13067

Trending Articles