locked
SyntaxDL-SendOnBehalf-Send As RRS feed

  • Question

  • Hi Experts i am  using Exchange Hybrid Environment, I am  using Exchange 2016 CU11, please correct me with the below syntaxes and also help me with the syntaxes to remove the user from DL(online & onprem)

    Send on Behalf

    ONLINE SYNTAX
    Set-DistributionGroup "CloudDL" -GrantSendOnBehalfTo "CloudUser"
    Set-DistributionGroup "CloudDL" -GrantSendOnBehalfTo "OnpremUser"

    ONPREM SYNTAX
    Set-DistributionGroup "OnpremDL" -GrantSendOnBehalfTo "CloudUser"
    Set-DistributionGroup "OnpremDL" -GrantSendOnBehalfTo "OnpremUser"

    =============================================

    Send-As
    ONLINE SYNTAX
    Add-RecipientPermission -Identity "CloudDL" -Trustee "CloudUser" -AccessRights SendAs
    Add-RecipientPermission -Identity "CloudDL" -Trustee "OnpremUser" -AccessRights SendAs

    ONPREM SYNTAX
    Get-DistributionGroup "OnpremDL" | Add-ADPermission -User "CloudUser" -AccessRights ExtendedRight -ExtendedRights "Send As"
    Get-DistributionGroup "OnpremDL" | Add-ADPermission -User "OnpremUser" -AccessRights ExtendedRight -ExtendedRights "Send As"

    Friday, February 1, 2019 5:24 PM

Answers

  • Send on behalf:
    =============
    Firstly, your commands are correct and the syntaxes to remove the user from DL are as followings:

    To add or remove one or more values without affecting any existing entries, use the following syntax: @{Add="<value1>","<value2>"...; Remove="<value1>","<value2>"...}.

    Or you could use a variable:

    $a.GrantSendOnBehalfTo = "CN=Branch Office Team,OU=Groups,OU=Company,DC=exchangeserverpro,DC=net"


    Then apply the new setting to the distribution group.

    Set-DistributionGroup "Sales Team" -GrantSendOnBehalfTo $a.GrantSendOnBehalfTo


    If you want to remove all send on behalf permissions from a group, you can run this command.

    Set-DistributionGroup "Sales Team" -GrantSendOnBehalfTo $null


    Send As:
    ======
    On-premise

    Get-DistributionGroup "OnpremDL" | Remove-ADPermission -User "OnpremUser " -AccessRights ExtendedRight -ExtendedRights "Send As"


    Please note the Add-ADPermission and Remove-ADPermission are available only in on-premises Exchange.


    Cloud

    We can use the Add-RecipientPermission cmdlet to add SendAs permission to users in a cloud-based organization. This cmdlet is available only in the cloud-based service.

    And use the Remove-RecipientPermission cmdlet to remove SendAs permission from users in a cloud-based organization.

    Remove-RecipientPermission "Help Desk" -AccessRights SendAs -Trustee "Ayla Kol"


    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Proposed as answer by Manu Meng Wednesday, February 6, 2019 10:46 AM
    • Marked as answer by Risingflight Saturday, December 28, 2019 7:00 PM
    Monday, February 4, 2019 5:27 AM

All replies

  • Send on behalf:
    =============
    Firstly, your commands are correct and the syntaxes to remove the user from DL are as followings:

    To add or remove one or more values without affecting any existing entries, use the following syntax: @{Add="<value1>","<value2>"...; Remove="<value1>","<value2>"...}.

    Or you could use a variable:

    $a.GrantSendOnBehalfTo = "CN=Branch Office Team,OU=Groups,OU=Company,DC=exchangeserverpro,DC=net"


    Then apply the new setting to the distribution group.

    Set-DistributionGroup "Sales Team" -GrantSendOnBehalfTo $a.GrantSendOnBehalfTo


    If you want to remove all send on behalf permissions from a group, you can run this command.

    Set-DistributionGroup "Sales Team" -GrantSendOnBehalfTo $null


    Send As:
    ======
    On-premise

    Get-DistributionGroup "OnpremDL" | Remove-ADPermission -User "OnpremUser " -AccessRights ExtendedRight -ExtendedRights "Send As"


    Please note the Add-ADPermission and Remove-ADPermission are available only in on-premises Exchange.


    Cloud

    We can use the Add-RecipientPermission cmdlet to add SendAs permission to users in a cloud-based organization. This cmdlet is available only in the cloud-based service.

    And use the Remove-RecipientPermission cmdlet to remove SendAs permission from users in a cloud-based organization.

    Remove-RecipientPermission "Help Desk" -AccessRights SendAs -Trustee "Ayla Kol"


    Regards,

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Proposed as answer by Manu Meng Wednesday, February 6, 2019 10:46 AM
    • Marked as answer by Risingflight Saturday, December 28, 2019 7:00 PM
    Monday, February 4, 2019 5:27 AM
  • Just checking in to see if above information was helpful. Please let us know if you would like further assistance.

    Regards, 

    Manu Meng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to shareexplore and talk to experts about Microsoft Teams.

    • Proposed as answer by Manu Meng Tuesday, February 12, 2019 1:49 AM
    Friday, February 8, 2019 9:54 AM