Forum Discussion
TaranjeetSM11
Aug 11, 2023Copper Contributor
Dynamic Distribution Group with no Disabled Accounts
Hi I'm trying to build a few Dynamic Distribution Lists in Exchange Online and want to only include Active Users (i.e., users that are marked "Active" in Azure AD). I've tried using the UserAccou...
Sajjad
Feb 14, 2025Brass Contributor
New-DynamicDistributionGroup -Name "ActiveUsersDDL" -RecipientFilter "((RecipientFilter -like "*") -and (UserAccountControl -band 2) -eq 0)" -RecipientContainer "OU=Users,DC=yourdomain,DC=com"
# Replace with your OU path