Oh boy these are fun! So I want DDGs for each Mailbox server and for each database on that server so:
DDG-Server; DDG-MBX01-Server etc, etc
So server DDG is easy:
New-DynamicDistributionGroup -alias “DDG-MBX01” -name “DDG MBX01” -recipientfilter {ServerName -eq “MBX01”} -org exchorg.local/MyOU/pf
So to see the membership you can run this:
$DDG = Get-DynamicDistributionGroup -Identity “DDG-MBX01”
Get-Recipient -Filter $DDG.RecipientFilter
Nice. So the fun comes when you want to do the same but for mailbox store. Bharat up on the Exchangepedia pointed me to this: http://exchangepedia.com/blog/2007/01/adventures-with-opath-some-annoyances.html
Not this works to a degree:
New-DynamicDistributionGroup “MBX01-MBX01” –organizationalUnit “exchorg.local/MyOU/pf” -RecipientFilter {database -eq “CN=MBX01-MBX01,CN=SG01-MBX01,CN=InformationStore,CN=MBX01,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=Exch,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=ExchOrg,DC=local”}
You can email it and it works, but you can’t get the membership. You get this error:
[PS] C:ps>$DDG = Get-DynamicDistributionGroup -Identity “BW MS MBX01-MBX01”
[PS] C:ps>Get-Recipient -Filter $DDG.RecipientFilter
Get-Recipient : Cannot bind parameter ‘Filter’ to the target. Exception setting “Filter”: “Cannot convert value “MBX01SG01-MBX01MBX01-MBX01” to type “Microsoft.Exchange.Data.Directory.ADObjectId”. Error: “The string “MBX01SG01-MBX01MBX01-MBX01″ does not represent a valid distinguished name.””
At line:1 char:22
+ Get-Recipient -Filter <<<< $DDG.RecipientFilter
So now I need to findout how to view the member of these DDGs without reverting the LDP