ldap query in AD for dynamic distro groups
I was hoping to use the ADUC to get the members of a dynamic distribution group. Running a custom search - (&(objectClass=user)(memberOf=cn=USEveryone,ou=groups,ou=test,ou=na,dc=domain,dc=local))
getting no results- is it even possible to get with dynamic groups?
thank you
June 14th, 2010 9:51pm
Dynamic distribution groups have no members.
--
Ed Crowley MVP
"There are seldom good technological solutions to behavioral problems."
.
"totalnet32" wrote in message
news:58d5afe4-4dc3-4f54-9487-96196f93eebc...
I was hoping to use the ADUC to get the members of a dynamic distribution group. Running a custom search - (&(objectClass=user)(memberOf=cn=USEveryone,ou=groups,ou=test,ou=na,dc=domain,dc=local))
getting no results- is it even possible to get with dynamic groups?
thank you
Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2010 6:26am
Right they are created on the fly when a message is sent. You could just query the same query you used to make the distribution group.
Mark Morowczynski|MCT| MCSE 2003:Messaging, Security|MCITP:EMA 2K7,EDA Win 7,ES,SA,EA|MCTS:Windows Mobile Admin|Security+|http://almostdailytech.com
June 15th, 2010 6:47am
I was hoping to use the ADUC to get the members of a dynamic distribution group. Running a custom search - (&(objectClass=user)(memberOf=cn=USEveryone,ou=groups,ou=test,ou=na,dc=domain,dc=local))
getting no results- is it even possible to get with dynamic groups?
thank you
You can check in EMC. Right click the DDL and then goto Properties->Conditions->Preview.
Or you can run following command to check what members will this DDL contain when a message is sent to it:
$DDL = get-dynamicDistributionGroup "YourDDLName"
get-recipient -RecipientPreviewFilter $DDL.RecipientFilter
Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM)
www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2010 12:46pm
Thank you
I need to give the output to a user for review.
GOt this error:
[PS] C:\Documents and Settings\ME>$DDL = get-dynamicDistributionGroup "Media"
Get-DynamicDistributionGroup : The operation could not be performed because object 'Media' could not be
found on domain controller 'dc01.you.LOCAL'.
At line:1 char:36
+ $DDL = get-dynamicDistributionGroup <<<< "Media"
[PS] C:\Documents and Settings\me>
June 15th, 2010 5:04pm
Thank you
I need to give the output to a user for review.
GOt this error:
[PS] C:\Documents and Settings\ME>$DDL = get-dynamicDistributionGroup "Media"
Get-DynamicDistributionGroup : The operation could not be performed because object 'Media' could not be
found on domain controller 'dc01.you.LOCAL'.
At line:1 char:36
+ $DDL = get-dynamicDistributionGroup <<<< "Media"
[PS] C:\Documents and Settings\me>
Ok.
Try to
1- use the email address of the DDL in command like this
$DDL = get-dynamicDistributionGroup "DDL@domain.com"
Or
2. You might have more than 1 domain controllers, so try to give -DomainController like this
$DDL = get-dynamicDistributionGroup "Media" -DomainController "YourDC"
Regards,
Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM)
www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
June 15th, 2010 7:15pm
getting closer
if i ran this:
[PS]$DDL = get-dynamicDistributionGroup "media" -DomainController "dc01"
[PS]get-recipient -RecipientPreviewFilter $DDL.RecipientFilter
the output looks like all recipients for the GAL, not just the Dynamic group
thanks
June 16th, 2010 6:40pm
getting closer
if i ran this:
[PS]$DDL = get-dynamicDistributionGroup "media" -DomainController "dc01"
[PS]get-recipient -RecipientPreviewFilter $DDL.RecipientFilter
the output looks like all recipients for the GAL, not just the Dynamic group
thanks
May be your DDL filter is same like Default GAL :)
Output will show the recipient based on the filter.
Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM)
www.HostingController.com
Free Windows Admin Tool Kit Click here and download it now
June 16th, 2010 7:05pm
Please use:
Get-Recipient -RecipientPreviewFilter $ DDL.RecipientFilter -OrganizationalUnit $DDL.RecipientContainer
Instead of:
get-recipient -RecipientPreviewFilter $DDL.RecipientFilter
Reference:
How to View Members of a Dynamic Distribution GroupJames Luo
TechNet Subscriber Support (http://technet.microsoft.com/en-us/subscriptions/ms788697.aspx)
If you have any feedback on our support, please contact tngfb@microsoft.com
June 17th, 2010 10:14am