Microsoft 365 features that help users manage their subscriptions, account settings, and billing information.
Hi Saleaway,
Thank you for contacting Microsoft Forum Support. From my test in the lab, I found the error is probably caused by the same Display Name, alias or prefix of proxy email address of different mailboxes in your organization. For example, if you have a user mailbox named “Vincent”, while a shared mailbox also named “Vincent”, PowerShell will confuse which one you want to check. For this issue, I suggest you run the following command. Also the reference link is here.
Get-Mailbox -RecipientTypeDetails UserMailbox -OrganizationalUnit "<Domain name /Area>" | Get-MailboxJunkEmailConfiguration | Format-Table -Auto Identity,Enabled
(Sample: Get-Mailbox -RecipientTypeDetails UserMailbox -OrganizationalUnit "contoso.com/North America" | Get-MailboxJunkEmailConfiguration | Format-Table -Auto Identity,Enabled)
The OrganizationUnit parameter locates the physical position in Active Directory. And if you don’t familiar with it, you can run the following command to get the organization unit values. You can refer to this article for more details. As a side note, if there is no value indicating the area value, you can just ignore it.
Get-OrganizationalUnit
And if you have any further question in the process above, feel free to let me know. I’ll help you further.
Regards,
Marvin