Dec 30 2022 05:50 AM - edited Dec 30 2022 05:51 AM
I'm trying to create a dynamic distribution group of full-time employees. Their status is in the user's account description. I've tried the following to no avail:
New-DynamicDistributionGroup -Name "DDL-Test" -RecipientFilter "(RecipientType -eq 'UserMailbox') -and (Description -eq 'Employee')". The Description is the field in on-prem AD under the 'General' tab.
I followed this link that says 'Description' is filterable recipient property:
https://learn.microsoft.com/en-us/powershell/exchange/recipientfilter-properties?view=exchange-ps
Any suggestions?
Jan 04 2023 12:07 PM
@gnussbaum hello, maybe this helps:
- i have only exchange on-prem
New-DynamicDistributionGroup -Name "DDL-Test" -Alias DDL-Test -OrganizationalUnit "yourAdDomain/yourOU/yourOUforSavingDistributingList" -RecipientFilter {((RecipientTypeDetails -eq 'UserMailbox') -and (Description -eq 'Employee'))} -RecipientContainer "yourAdDomain/yourOU/OUwithUsers"
- you dont need Parameter "-RecipientContainer", if your scope is the entire AD
- i didnt do this with the description field, but can test this in the next few days
- if you have exchange online would say is the same, but not sure
best wishes
René
Jan 04 2023 12:09 PM
Jan 06 2023 11:07 AM
Jan 06 2023 12:55 PM
Jan 06 2023 01:05 PM