Following this guide: https://blogs.technet.microsoft.com/exchange/2015/03/03/want-more-control-over-sent-items-when-using-shared-mailboxes/
I must issue these commands in Exchange Powershell (Exchange Management Console):
set-mailbox <mailbox name> -MessageCopyForSentAsEnabled $True
set-mailbox <mailbox name> -MessageCopyForSendOnBehalfEnabled $True
However, I have a lot of shared mailboxes. I want don't want to have to issue this command 100 times. Is there a variable and/or script I can use for <mailbox name>
which will let me automate this process for all shared mailboxes? (It's very important that I apply this to only shared mailboxes, and not just all mailboxes)