Solved

Powershell: Exchange 2010

Posted on 2013-12-05
4
125 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

Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
how to add IIS SMTP to handle application/Scanner relays into office 365.

762 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

19 Experts available now in Live!

Get 1:1 Help Now