Home > Exchange 2010 > Full-Mailbox Permission Script: Exchange 2010

Full-Mailbox Permission Script: Exchange 2010

If you need a quick script to add the “FullAccess” permission for an account on behalf of another Exchange 2010 mailbox, here is your script:

#Save this file as Add-Full-Mailbox-Permission.ps1
$user=Read-Host “Enter a user name”
$mailbox=Read-Host “Enter a mailbox you want to add the user to”
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
Set-ADServerSettings -ViewEntireForest:$True
Set-ADServerSettings -PreferredServer MyDomainConroller.vlab.com
Remove-MailboxPermission $mailbox -Accessrights “FullAccess” -User $user | FL    # I added this to remove the account first, just in case the ACL is hosed in some way.
Add-MailboxPermission $mailbox -Accessrights “FullAccess” -User $user | FL
#End of Script

Now we can make it easier by creating a batch script that we can use to invoke the Exchange command at will.

##Save this file as Call-Add-Full-Mailbox-Permission.bat
Powershell.exe -noexit c:\scripts\Add-Full-Mailbox-Permission.ps1

Once you have both files created, you can now click on the batch file and use the script at your leisure.  This is much easier than trying to remember syntax…..


Best of Luck!

Ed McKinzie

Categories: Exchange 2010
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: