Solved

Exchange Powershell Command

Posted on 2011-09-16
2
398 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
2 Comments
 
LVL 32

Accepted Solution

by:
endital1097 earned 500 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2016 Media 3 25
Exchange 2016 Dag Question 2 35
Best way to see if our database copy in exchange 2013 is suspened 17 24
outlook 6 38
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

770 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