Solved

script to create shared mailbox in exchange 2013

Posted on 2016-11-22
2
20 Views
Last Modified: 2016-11-28
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 10

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 2

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This video discusses moving either the default database or any database to a new volume.

706 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

21 Experts available now in Live!

Get 1:1 Help Now