Solved

script to create shared mailbox in exchange 2013

Posted on 2016-11-22
2
334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses
Course of the Month9 days, 17 hours left to enroll

624 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