Quantcast
Channel: Exchange Server 2013 - General Discussion forum
Viewing all articles
Browse latest Browse all 4521

PowerShell DDG not so Dynamic...

$
0
0

I've looked & looked, but can seem to figure out why when creating a Dynamic Distribution Group w/ PowerShell, the group remains empty (verified that by sending email to it, as well as trying to enumerate the recipients).

DDG creation:
New-DynamicDistributionGroup -Name "DDG1" -OrganizationalUnit "domain.name/OU1/OU2/OU3/Users" -RecipientFilter { ((RecipientContainer -eq "domain.name/OU1/OU2/OU3/Users") -and (RecipientType -eq "UserMailbox")) }

 >I'm using the -RecipientFilter since I want to add additional items like -ExtenstionCustomAttribute1 after I get this base issue resolved.

I validated the OU path with:
Get-OrganizationalUnit "domain.name/OU1/OU2/OU3/Users" | fl CanonicalName

Using this to enumerate:
$DDG1 = Get-DynamicDistributionGroup "DDG1"

Get-Recipient –RecipientPreviewFilter $DDG1.RecipientFilter  -OrganizationalUnit $DDG1.RecipientContainer | FT Name,OrganizationalUnit

To prevent AD OU location issues, I'm placing the group in the same OU as the users even. When I create this with the EAC instead, it works fine (can't use the EAC though due to needing the ExtensionCustomAttribute option mentioned previously).

This is Exchange 2013 on-prem only.

Thanks in advance for any help!




Viewing all articles
Browse latest Browse all 4521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>