1

I need to create a dynamic DL to list the members of an individual database and I'm unable to get the powershell command to filter the results properly.

[PS] C:\>New-DynamicDistributionGroup -Name "test1233" 
    -RecipientFilter {Database -eq  "CN=JournalRecover,CN=Databases,
      CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,
      CN=Company,CN=MicrosoftExchange,CN=Services,CN=Configuration,DC=company,DC=com" }

The reason I'm attempting this DG is so that I can populate the following powershell script to export email for all users in a database

[PS] C:\>$mbxs = Get-MailboxDatabase rdb16 | Get-MailboxStatistics
[PS] C:\>New-MailboxSearch -Name "test2" -SourceMailboxes $mbxs 
         -TargetMailbox journalrecover  -StartDate "11/1/2012"
         -EndDate "11/15/2012" -IncludeUnsearchableItems:$true 
         -SearchDumpster:$true -ExcludeDuplicateMessages:$true
         -DoNotIncludeArchive:$true

Question

  1. How can I create a DG that filters by Database?
  2. OR how can I alter the mailbox search so it applies to multiple mailboxes in the database?
2
  • What is the problem? Do you get an error when issuing the New-DynamicDistributionGroup cmdlet? if so, please post it Apr 18, 2013 at 15:28
  • I don't get any error, I simply get no results when expanding the group, even though normal mailbox users have a account on journalrecover Apr 18, 2013 at 15:45

1 Answer 1

1

Your syntax is correct but you have a typo in your DN. CN=MicrosoftExchange should be CN=Microsoft Exchange. You can also preview membership with:

$dyn = Get-DynamicDistributionGroup test1233 Get-Recipient -RecipientPreviewFilter $dyn.RecipientFilter

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .