Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

full mailbox control exchange management shell / powershell

Posted on 2014-10-16
4
Medium Priority
?
198 Views
Last Modified: 2014-10-16
Hi,

This example gives mailbox 2 full control over mailbox 1.

Add-MailboxPermission -Identity mailbox1 -User mailbox2 -AccessRight FullAccess -InheritanceType All -Automapping $false

I have a csv file with all the users who should be given full mailbox control over mailbox1

So in a loop, i would like...

Add-MailboxPermission -Identity mailbox1 -User [variable] -AccessRight FullAccess -InheritanceType All -Automapping $false
0
Comment
Question by:cmatchett
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Joshua Grantom earned 2000 total points
ID: 40384694
$users = Import-CSV C:\File.csv
foreach ($user in $users) {
Add-MailboxPermission -Identity mailbox1 -User $user.ColumnHeader -AccessRight FullAccess -InheritanceType All -Automapping $false 
}

Open in new window


This should work, just replace "ColumnHeader" with the the name of the Column in your CSV (ex. Username) if there isnt one, then delete ".ColumnHeader"
0
 

Author Comment

by:cmatchett
ID: 40385597
fantastic work !
0
 

Author Closing Comment

by:cmatchett
ID: 40385600
thanks !!
0
 
LVL 16

Expert Comment

by:Joshua Grantom
ID: 40385611
You're welcome!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
Loops Section Overview
Screencast - Getting to Know the Pipeline

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question