Solved

script to create shared mailbox in exchange 2013

Posted on 2016-11-22
2
59 Views
Last Modified: 2017-01-17
hello,

i need a script to create 100 shared mailbox from a csv file and affect full access permission to some user and put the account in specific organisationnal unit in Active directory

my csv file look like this:

alias,fullaccess
shared1,user1;user2;user3
shared2,user1;user2;user3
shared3,user1;user2;user3

thank for help
0
Comment
Question by:cawasaki
2 Comments
 
LVL 11

Accepted Solution

by:
Ganesh Kumar A earned 500 total points
ID: 41897180
import-csv C:\temp\sharedMailbox.csv | ForEach-Object {New-Mailbox -shared  -Name $_.Name  -Alias $_.Alias  -OrganizationalUnit $_.OrganizationalUnit -UserPrincipalName $_.UserPrincipalName -Database $_.Database} |

CSV format
Name,alias,OU,UserPrincipalName,Database,user1, user2, user3,


impor-csv permission.csv | ForEach-Object { Add-adPermission $_.room -User $_.user -ExtendedRights "Full Access" }


There is a script for O365, might be useful and throw some lights for onpremises, remove which you dont need if you are expert:.
https://social.technet.microsoft.com/Forums/lync/en-US/1313715e-cbaa-486d-974b-ecc77113c64e/how-to-create-multiple-shared-mailboxes-in-office-365-using-powershell?forum=winserverpowershell
0
 
LVL 3

Expert Comment

by:Marcos Santo
ID: 41897250
Also besides a script you could do it from Active Directory select all users and add the mailbox. after you order the users you want in OU's.? isn't this faster then thinking about a script.

When you have a scipt it is easier and faster but when you don't have a script this might be an option aswell.

I see ganesh posted a script let us know if i worked for you.
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

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

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
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.
To show how to create a transport rule 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 >> Rules tab.:  To cr…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

863 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

22 Experts available now in Live!

Get 1:1 Help Now