Thursday, September 4, 2008

How to Remove Mailbox Permissions from Shell




We talked about granting user A full mailbox access on user B mailbox, and this can be done via GUI from EMC or EMS (management console and Shell). In below example we also are going to remove the permissions we assign to the user mailbox and we will see the current configuration as well

Sales mailbox


Get-MailboxPermission Sales


Remove permissions from Sales mailbox for user CaneT


Remove-MailboxPermission "Sales" -AccessRights FullAccess -user " CaneT "


Add mailbox permissions into Sales mailbox for user CaneT


Add-MailboxPermission "Sales" -AccessRights FullAccess -user " CaneT "



Also please see msexchangeteam Blog


#Move an individual mailbox
Move-Mailbox testmbx -targetdatabase "Mailbox Database"

# Move all mailboxes stored on a server to a target mailbox database
Get-Mailbox -server testserver Move-Mailbox -targetdatabase "Mailbox Database"

# Disable one individual mailbox
Disable-Mailbox testmbx

# Disable all mailboxes stored on a server
Get-Mailbox -server testserver Disable-Mailbox

# Remove one individual mailbox-enabled user
Remove-Mailbox testmbx

# Remove all mailbox-enabled users stored on a server
Get-Mailbox -server testserver Remove-Mailbox


--Oz Ozugurlu

MVP (Exchange) MCITP (EMA),

MCITP (SA) MCSE 2003, M+, S+,

MCDST, Security+, Project +, Server +

Blog: http://www.smtp25.blogspot.com

No comments: