Solved

script to create shared mailbox in exchange 2013

Posted on 2016-11-22
2
129 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 4

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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  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

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.
In-place Upgrading Dirsync to Azure AD Connect
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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