Forum Discussion
ThomasLam
Jun 03, 2020Copper Contributor
Got error "The specified mailbox "xxxxxxx" isn't unique" when trying to Get-InboxRule
Hi all, Hope all is well with you. I'm trying to get a list of InboxRule which is configured to forward/redirect email to external email address for all email accounts. Below is the script th...
- Jun 04, 2020
You already have all the information you need, no need to request it again. Here's a sample script I wrote a while back for the same scenario: https://www.quadrotech-it.com/blog/office-365-permissions-inventory-mailbox-forwarding/
ThomasLam
Jun 03, 2020Copper Contributor
Thanks for the reply. Im using PrimarySmtpAddress which is a unique identifier but just somehow the second for loop cannot get the right value from the Get-Mailbox. And the reason i used double for loop is because the second one need to get the identity value from the first for loop but it also need to get the PrimarySmtpAddress from the Get-Mailbox. So im not sure how it can be archived.
VasilMichev
Jun 04, 2020MVP
You already have all the information you need, no need to request it again. Here's a sample script I wrote a while back for the same scenario: https://www.quadrotech-it.com/blog/office-365-permissions-inventory-mailbox-forwarding/
- SystemEngineerDec 12, 2022Steel ContributorHi @Vasil,
Thank you for sharing :-), however, the link has broken.