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...
HillenL
Aug 06, 2025Iron Contributor
Use the -AccountDisabled property, which is supported in Exchange Online. Here's how you can adjust your recipient filter
RecipientType -eq 'UserMailbox' -and AccountDisabled -eq $false
This will only include active (non-disabled) mailboxes in the dynamic distribution list.