Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Powershell: Exchange 2010

Posted on 2013-12-05
4
Medium Priority
?
147 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
[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
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 38

Accepted Solution

by:
Mahesh earned 1500 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
In this video we show how to create an email address policy 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 Mail Flow…
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…
Suggested Courses

610 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