Solved

Exchange 2010 Management Shell

Posted on 2015-01-10
1
71 Views
Last Modified: 2015-01-12
This is the senerio. I have users with full manage access to shared mailboxes, but we have been involved in a mailbox migration from 1 org to another and as a result the mailbox permissions have been broken. I have an
excel .csv file with all the mailboxes that each user has permissions to. This is in the hundreds of mailboxes and users have access to multiple mailboxes. In the Excel csv file I have the name of the mailboxes and the users that has access to them. Is there a way that a script can be run in EMS against the .csv so that it will assign those users back to the mailbox. This is the script I generally run when there is 1 .csv with multiple users accessing the same mailbox I generally export all the users in a csv into a variable and them manually specify the name of the mailbox identity:

$userList = Import-Csv .\excel\name.csv
foreach ($user In $userList) {
Add-MailboxPermission -Identity “mailbox name” -User $user.Name -AccessRights FullAccess–InheritanceType All
}

So now, I have 1 .csv but in this csv there are multiple users and multiple mailboxes, and I would like to know how to run a similar script or cmdlet against the info in the csv so that those users can be reassigned the mailboxes they are next to in the csv file. Any assistance will be greatly appreciated.

example.xlsx
0
Comment
Question by:timgreen7077
1 Comment
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
ID: 40542837
Let's assume the mailbox name column in the CSV  is Mailbox, as the username is Name. Then all you have to change in your script is to replace "mailbox name" with $user.Mailbox.
According to the attached CSV, it is different:
foreach ($user In Import-Csv .\excel\name.csv) {
  Add-MailboxPermission -Identity $user.Identity -User $user.User -AccessRights FullAccess–InheritanceType All
}

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
A procedure for exporting installed hotfix details of remote computers using powershell
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
This video discusses moving either the default database or any database to a new volume.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now