Wednesday, 5 August 2015

Grant Send As Permission using Powershell

We can grant send as permission for a exchange mailbox using the Add-ADPermission powershell cmdlet. To perform this task, your account need to be added in the server roles Organization Management and Recipient Management.

Run the following command to load Exchange cmdlets to use the Add-ADPermission cmdlet.
Add-PSSnapin *Exchange*
Use the following command to configure "Send As Permissions"
Add-ADPermission -Identity "Kevin" -User "Morgan" -Extendedrights "Send As"
Identity - The name of the mailbox on which the Send As permission should be added.
User - The mailbox that should be granted the permission.

Set Send As Permission for Bulk Mailboxes from Text file:

Use the below powershell script to configure send as permissions for bulk exchange mailbox users from text file. First create the text file Mailboxes.txt which includes one mailbox in each line.
Get-Content C:\Mailboxes.txt | ForEach-Object{
 $mailbox = $_
 Add-ADPermission -Identity $mailbox -User "Morgan" -Extendedrights "Send As"
}

Configure Send As Permission for multiple Mailboxes:

Use the below powershell command to grant send as permission for multiple exchange mailbox users.
$mailboxes = "TestUser1","TestUser2"
$mailboxes  | ForEach-Object{
 $mailbox = $_
 Add-ADPermission -Identity $mailbox -User "Morgan" -Extendedrights "Send As"
}

Advertisements
Advertisements

No comments:

Post a Comment