Forum Discussion
eg0nzalez
Mar 25, 2022Copper Contributor
Need assistance creating Dynamic Distro Groups - Exchange - Office365
I need to create 100 new Dynamic Distro Groups. And, I'm a bit unsure of what my current .ps script will do. Include all 50 states including three Custom Attributes: Custom Attribute1: users state...
VasilMichev
Mar 26, 2022MVP
As the documentation explains, you can't use any Conditional parameters in combination with the RecipientFilter one. So best combine all of the required checks within the recipient filter. Something like:
New-DynamicDistributionGroup -Name "_All Florida Employees" -DisplayName "_All Florida Employees" -RecipientFilter "((RecipientType -eq 'UserMailbox') -and (CustomAttribute3 -eq "FL") -and (CustomAttribute7 -eq "true") -and (CustomAttribute8 -eq "Regular")) -PrimarySmtpAddress "Email address removed"
New-DynamicDistributionGroup -Name "_All Florida Employees" -DisplayName "_All Florida Employees" -RecipientFilter "((RecipientType -eq 'UserMailbox') -and (CustomAttribute3 -eq "FL") -and (CustomAttribute7 -eq "true") -and (CustomAttribute8 -eq "Regular")) -PrimarySmtpAddress "Email address removed"
- eg0nzalezMar 31, 2022Copper Contributor
VasilMichev I should have responded to this post two days ago. But I was able to figure it out. I appreciate the explanation.