Wednesday, 5 August 2015

Remove Send As Permissions using Powershell

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

Before proceed, run the following command to enable Exchange cmdlets if you are working with Powershell console instead of Exchange Management Shell.
Add-PSSnapin *Exchange*
Use the following command to remove "Send As Permissions"
Remove-ADPermission -Identity "Kevin" -User "Morgan" -Extendedrights "Send As" -Confirm:$False
Identity - The name of the mailbox on which the Send As permission should be removed.
User - The name of the user object that will have permissions to be removed.

Remove Send As Permission from multiple Mailboxes:

Use the below powershell command to remove Send As permissions from multiple exchange mailbox users.
$mailboxes = "TestUser1","TestUser2"
$mailboxes  | ForEach-Object{
 $mailbox = $_
 Remove-ADPermission -Identity $mailbox -User "Morgan" -Extendedrights "Send As" -Confirm:$False
}

Advertisements
Advertisements

No comments:

Post a Comment