hi
i have created a DDG through powershell which checks against the Users AD attributes - Office and Mobile Phone.
Set-DynamicDistributionGroup "hasmobile" -RecipientFilter {(RecipientType -eq "UserMailBox") -and (MobilePhone -ne $Null) -and (Office -eq "ABC")} $tmp = Get-DynamicDistributionGroup "hasmobile" get-recipient -RecipientPreviewFilter $tmp.RecipientFilter
This works as expected in Powershell and changes to the AD object stop it being returned . e.g. removing/adding a mobile number
I have then created a mail flow rule to apply when "if the sender is a member of this group" = "hasmobile"
However, when i run this it always applies this rule regardless of whether the rule is matched or not.
I have also tried appending a
"-RecipientContainer 'DC=ABC,DC=local'"
to the filter via powershell but this still does not work.
Can anyone elaborate on why this is getting applied when the criteria does not match please ?
any help greatly appreciated.