I need to use the AD office-field as condition for an E-mail address policy.
I googled it, but unfortunately I found no solutions.
Do you have an idea how to solve this?
Any help would be highly appreciated.
Greetings Löwä Cent
I need to use the AD office-field as condition for an E-mail address policy.
I googled it, but unfortunately I found no solutions.
Do you have an idea how to solve this?
Any help would be highly appreciated.
Greetings Löwä Cent
Alright, I've found the solution by myself.
The key is the Exchange Management Shell.
With the following prompt you can filter by any AD-Field you want:
New-EmailAddressPolicy -Name 'PolicyName' -EnabledEmailAddressTemplates 'SMTP:YourAddressTemplate@your.domain' -RecipientFilter {((RecipientType -eq 'UserMailbox') -and ((Office -like '1stOffice') -or (Office -like '2ndOffice') -or (Office -like '3rdOffice')))}
If you want to filter by another AD-field, change "Office" to whatever field you want to filter.
I hope this will help some people in the future.