You may need to exclude disabled users in Dynamic distribution Groups
for that you can use “UserAccountControl” filter property.
1. Get the list of user with account disabled using following EMS
Get-user | FL Name, *Con*
2. Create Dynamic Distribution group using following cmd
New–DynamicDistributionGroup–Name“MyGroup”–Alias“MyGroup”–RecipientFilter{(RecipientType–eq ‘UserMailbox’)–and–not(userAccountControl –eq ‘AccountDisabled, NormalAccount’)}