Solved

Exchange 2010 Management Shell

Posted on 2015-01-10
1
78 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 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
In this video we show how to create a Contact 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 Recipients >> Contact ta…
In this video we show how to create an email address policy 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…

738 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