?
Solved

Exchange Powershell Command

Posted on 2011-09-16
2
Medium Priority
?
403 Views
Last Modified: 2012-08-13
I am trying to create an exchange powershell command to create a dynamic exchange group from members of multiple distribution lists.  Example below

New group that im trying to create (Group G) needs to contain members of group A and B which are also members of group C

Anyone have an idea on how to create a dynamic group with this kind of complexity
0
Comment
Question by:marmarmat
[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 32

Accepted Solution

by:
endital1097 earned 1500 total points
ID: 36554108
this type of dynamic group is not possible

you could create a static group using these parameters and then have a scheduled task that updates the membership
here is the script that you could run to create the initial group membership
Get-DistributionGroupMember groupA | where { foreach($user in Get-DistributionGroupMember groupC) {$g.Name -eq $_.Name }} | ForEach-Object { Add-DistributionGroupMember GroupG -Member $_.Name }

the script to update you would want to clear the membership and readd (easiest) otherwise you would need to detect names to remove and add
0
 
LVL 3

Expert Comment

by:ericwoodford
ID: 37998934
If you just want all members of group A and group B to be in a dynamic DL, populate a custom attribute (1-15) on the groups, then define your Dynamic group using the Exchange console, to include Mail enabled groups that contain that custom attribute value. I just tested this in Exchange 2007 EMC.

If you are looking for only a portion of group A and group B, Endital1097's solution looks good.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

752 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