Hi @alee-work
According to your post, I suppose the problem may be the following syntax:
-and (Company -eq 'CompanyA') -and (Title -eq 'CompanyA Relief Push') -or (Title -like 'Rig Manager')
This syntax would add mailboxes whose Company is CompanyA and Title equals CompanyA Relief Push, or mailboxes whose Title contains Rig Manager (this would add CompanyB's Rig Manager to this DDG)
To be simple, it is supposed to be A and (B or C), but currently it is (A and B) or C.
I suppose the right syntax here should be:
-and (Company -eq 'CompanyA') -and (Title -eq 'CompanyA Relief Push' -or Title -like 'Rig Manager')
The whole filter should be like:
(MemberOfGroup -eq 'CN=#CompanyA - Rigs Universal,OU=CompanyADistributionGroups,OU=CompanyAUsers,DC=CompanyA,DC=internal') -or ((RecipientType -eq 'UserMailbox') -and (Company -eq 'CompanyA') -and (Title -eq 'CompanyA Relief Push' -or Title -like 'Rig Manager')) -or ((RemoteRecipientType -eq 'Migrated') -and (Company -eq 'CompanyA') -and (Title -eq 'CompanyA Relief Push' -or Title -like 'Rig Manager')) -or ((RecipientType -eq 'MailContact') -and (Company -eq 'CompanyA') -and (Title -eq 'CompanyA Relief Push' -or Title -like 'Rig Manager')) -and (-not(Name -like 'SystemMailbox{')) -and (-not(Name -like 'CAS_{')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox'))
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Yes, this was helpful. Thank you for your help on this. I have readjusted the syntax of the code and it is giving the results that we were expecting now.
Hi,
Glad to hear the issue has been resolved!
Please feel free to accept the reply as the answer to the question if it helped you with this issue.
To accept an answer in Q&A
It would help other community members as well.