Skip to content
Tech Shizz Logo

An Engineers Blog

  • TechShizz
  • blog

Grant Send on Behalf permissions via powershell

Posted on February 23, 2021 By rich No Comments on Grant Send on Behalf permissions via powershell

Grant Send on Behalf Permissions using Powershell

 
 
We can set or grant send on behalf permission for a exchange mailbox user using the powershell cmdlet Set-Mailbox with the parameter GrantSendOnBehalfTo. Use the below command to set send on behalf permission.

Set-Mailbox "[Identity]" -GrantSendOnBehalfTo @{add="[User]"}

[Identity] – The name of the mailbox user on which the send on behalf permission to be added.
[User] – The user to be granted the send on behalf permission.

The following command grants “Morgan” send on behalf permission to Kevin’s mailbox.

Set-Mailbox "Kevin" -GrantSendOnBehalfTo @{add="Morgan"}

You can also grant permission for multiple users by giving user names as comma separated values.

Set-Mailbox "Kevin" -GrantSendOnBehalfTo @{add="User1","User2"}

The above commands add permission with existing send on behalf permissions and it does not overwrite the existing permissions (this is required for most cases). You can check the applied permissions by using below command.

Get-Mailbox "Kevin" | Select -ExpandProperty GrantSendOnBehalfTo | Select Name,Parent

Grant Send-on-Behalf permission for multiple user mailboxes

We can use the exchange management powershell cmdlet Get-Mailbox to get specific set of user mailboxes and pipe the results to Set-Mailbox cmdlet. The following command grants send on behalf permission for “Morgan” to all the mailboxes.

Get-Mailbox | Set-Mailbox -GrantSendOnBehalfTo @{add="Morgan"}

You can also apply filters in Get-Mailbox cmdlet to select particular set of users. The following command select mailbox users from TestOU and pipe the results to Set-Mailbox cmdlet to set send on behalf rights.

Get-Mailbox | Where {$_.DistinguishedName -like "*OU=TestOU,DC=TestDomain,DC=com*"} |
Set-Mailbox -GrantSendOnBehalfTo @{add="User1","User2"}

Post navigation

Next Post: List all SMTP Addresses for all Mailboxes or Distribution Groups in Exchange ❯

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Subscribe to our newsletter!

Recent Posts

  • How to implement a lightning-fast ransomware playbook
  • How to achieve defence in depth in your business
  • How to implement a SecOps team phishing response plan
  • How to block an Office 365 Sign-in correctly
  • Microsoft finally patched serious Exchange 0-day over a month old!

Recent Comments

    Archives

    • November 2022
    • July 2021
    • March 2021
    • February 2021

    Categories

    • Cyber Security
    • Uncategorized

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Copyright © 2023 .

    Theme: Oceanly News Dark by ScriptsTown