Try this after connecting to Exchange Online (unless you're doing this in an on-site AD organization):
$DL = "group-identity"
$U = "Melvin.McPhucknuckle@contoso.com"
Set-DistributionGroup -Identity $DL -AcceptMessagesOnlyFrom @{Add=$U}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all,
I want to add a user into the delivery management part of a distribution group so they can send emails to this group - how do I do this via powershell as doing it using the portal I get a error stating "There are multiple recipients matching the identity "user". Please specify a unique value."
and after removing this user I get the same error even though the user isnt there
Try this after connecting to Exchange Online (unless you're doing this in an on-site AD organization):
$DL = "group-identity"
$U = "Melvin.McPhucknuckle@contoso.com"
Set-DistributionGroup -Identity $DL -AcceptMessagesOnlyFrom @{Add=$U}