The problem here is that 'gh' has send on behalf permissions to 'ab' and 'gh' but 'ef' does not!
Looks like my logic is wrong as the final item in arr2 gets the send on behalf permission but the rest do not. How do I give all items in the 2nd array send on behalf permissions and not just the last one?
**update** Logic is fine. What is happening is exchange is replacing the permissions so as 'ef' is granted access to 'ab', when powershell iterates over to to 'gh' it overrides the permissions 'ef' already had, resulting in 'gh' having send on behalf permissions only...
2) Output what you're trying to do.
Open in new window
3) Rephrase your question and explain your logic a little bit better. Add a concise and complete example.