?
Solved

Exchange 2010 Management Shell

Posted on 2015-01-10
1
Medium Priority
?
83 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 70

Accepted Solution

by:
Qlemo earned 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 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