I'm using AD groups to manage most of my Exchange mailbox properties. I have serveral managed mailbox folder policies that need to get applied to user mailboxes based on what AD group they are a member of. For Example, if I have Mailbox Policies A-D, I have a corresponding AD Group A-D.
I'd like to write a powershell script that would filter mailboxes based on the MemberOfGroup attribute, and if the user is a member of AD Group A, it would set mailbox policy A, if the user was a member of AD Group B it would set mailbox policy B, and if the user was not a member of group A,B,C, or D it would set mailbox policy E.
I don't know how to use IF or OR operators in a PowerShell script on my Exchange server. Does anyone have anyexperience with this?
Thanks. |