Need script to remove full mailbox access

Hi All,

I have full mailbox access on 200 mailboxes in exchange 2010. I have the email ids in excel sheet. I want to remove my user id from the full mailbox access. I know the one line command in powershell to remove it one by one. I need a script where I would call my excel sheet and it will remove full mailbox access from all email ids.
LVL 1
Manish KumarSr. Technical ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Manish KumarSr. Technical ConsultantAuthor Commented:
Hi All,

I figured it out . Below is the option to get the result.
Create one CSV file. Fill the csv file with Title "Email" and fill all the email addresses from where full mailbox access needs to be revoked of any particular user. Like this

Email
Steve.Haines@xxxxx.com
Steve.Pick@xxxxx.com

Once this CSV file gets created , save it to any location on the server from where script needs to be run and note down the path.

Then use the below command in EMS
Import-CSV C:\removeacess.csv | ForEach-Object {Remove-MailboxPermission -Identity $_.email -User <user id> -AccessRights FullAccess -Confirm:$false}

Change the path of csv file and name of user id.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.