Hi Rising Flight,
Welcome to our forum!
1.Both Exchange Online and On-Premises use Set-DistributionGroup
and Set-DynamicDistributionGroup
with the -GrantSendOnBehalfTo
parameter. For Send As, the process is different. Send As is a permission managed via AD permissions, so the cmdlets involved are Add-RecipientPermission
. The syntax would be using Add-RecipientPermission
Send on Behalf
Use -GrantSendOnBehalfTo
with Set-DistributionGroup
(for static DLs) or Set-DynamicDistributionGroup (for dynamic DLs).
Exchange Online/On-Premises Syntax:
# Static Distribution List
Set-DistributionGroup "DL1" -GrantSendOnBehalfTo @{Add="user1"}
# Dynamic Distribution List
Set-DynamicDistributionGroup "DynamicDL1" -GrantSendOnBehalfTo @{Add="user1"}
Send As
Use Add-RecipientPermission
to grant the SendAs
right. This applies to both static and dynamic DLs.
Exchange Online/On-Premises Syntax:
# Static or Dynamic Distribution List
Add-RecipientPermission -Identity "DL1" -Trustee "user1" -AccessRights SendAs
2.Yes, replacing Set-DistributionGroup with Set-DynamicDistributionGrou works for parameters that are common to both cmdlets. For example:
# Works for dynamic DLs
Set-DynamicDistributionGroup "DynamicDL1" -AcceptMessagesOnlyFrom @{Add="user1"}
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.