Solved

script to create shared mailbox in exchange 2013

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Utilizing an array to gracefully append to a list of EmailAddresses
Read this checklist to learn more about the 15 things you should never include in an email signature.
To show how to generate a certificate request 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 Servers >> Certificates…
This video discusses moving either the default database or any database to a new volume.

832 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