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

x
?
Solved

Exchange Powershell Command

Posted on 2011-09-16
2
Medium Priority
?
405 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
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…
To show how to generate a certificate request 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 >> Certificates…
Suggested Courses

604 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