I've got a hair pulling problem (I think)
Here's the code: $dn="abc.com"
Get-Recipient -Filter {EmailAddresses -Like '$dn'} -- didn't work
Get-Recipient -Filter {EmailAddresses -Like '*$dn*'} -- didn't work
Get-Recipient -Filter {EmailAddresses -Like *'$dn'*} -- didn't work
Get-Recipient -Filter {EmailAddresses -Like '*abc.com*'} -- WORKS
How can I make it work with a variable, instead of a literal string value?
Thanks in advance.