Solved

Powershell: Exchange 2010

Posted on 2013-12-05
4
126 Views
Last Modified: 2014-05-01
I have been using powershell to create AD Users and Mailboxes, similar to below:

New-MailUser -Name Bob -FirstName Bob -LastName Smith -ExternalEmailAddress
bsmith@myco.com -UserPrincipalName bob@myco.com
-OrganizationalUnit myco.com

Am I able to take it one step further and add to multiple security groups / distribution lists as well?  If so, could you provide a quick example?

Thanks
0
Comment
Question by:trecool
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 39699276
To add a user to the dirstribution group you would use a command line the one below.

Add-DistributionGroupMember -Identity "Group Name" -Member bob@myco.com
0
 

Author Comment

by:trecool
ID: 39699305
can you append it to the original command?
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 39699392
You cant really append it to the first command because it is a seperate action. You need to create the user account before it can be added to any groups.
0
 
LVL 35

Accepted Solution

by:
Mahesh earned 500 total points
ID: 39699418
You can just make copy of existing user having same group membership from active directory and then create mailbox either from shell or EMC
It is the easiest way if user needs to be part of bunch of groups

Mahesh
0

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a trade show? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Question has a verified solution.

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

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
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.
In this video we show how to create an Address List 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 Organization >> Ad…
In this video we show how to create a mailbox database 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 >> Data…

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

25 Experts available now in Live!

Get 1:1 Help Now