Share via


The operation couldn't be performed because "name" matches multiple entries

Question

Friday, August 24, 2018 1:23 PM

I'm trying to set up mail box auditing across all of our in cloud mailboxes by running the following script:

get-mailbox -resultsize unlimited | set-mailbox -auditenabled $true  -AuditLogAgeLimit 180 -AuditAdm
in update, movetodeleteditems, softdelete, harddelete, sendas, sendonbehalf, create, updatefolderpermissions -AuditDeleg
ate update, softdelete, harddelete, sendas, create, updatefolderpermissions, movetodeleteditems, sendonbehalf -AuditOwne
r updatefolderpermission, mailboxlogin, create, softdelete, harddelete, update, movetodeleteditems

This works for the majority of mailboxes, for a handful I'm getting the above error.

I've tried get-mailbox %username%...., and get-mailbox %userprincipalname%... and get-mailbox %samaccountname%... all give the same error.

Has anyone got any ideas how I can get this resolved?

All replies (10)

Wednesday, August 29, 2018 7:55 PM ✅Answered

That means that there are different objects!  Remove the duplicate properties from one of the duplicate objects.

Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Celebrating 20 years of providing Exchange peer support!


Friday, August 24, 2018 3:30 PM

If you only run Get-Mailbox command against to one of these that failed, what is the result?


Friday, August 24, 2018 3:33 PM

It varies, but there are two entries for the mailbox, for example one in the format firstname.surname@domainame.com and the other alias@domain.onmicrosoft.com


Sunday, August 26, 2018 8:13 PM

If there are two entries, then there are two mailboxes.

Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Celebrating 20 years of providing Exchange peer support!


Tuesday, August 28, 2018 8:36 AM

If there are two entries, then there are two mailboxes.

Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Celebrating 20 years of providing Exchange peer support!

I don't disagree with that, but it doesn't help me.

As I said originally, I've tried entering the user name, UPN and SAMaccountname and get the same results.


Wednesday, August 29, 2018 2:50 AM

Then you have duplicated values.  Use Get-Mailbox name | FL DistinguishedName to find the exact objects in Active Directory then fix the duplicated properties.

Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Celebrating 20 years of providing Exchange peer support!


Wednesday, August 29, 2018 9:24 AM

I've done this for the three troublesome objects, but the DN's are all slightly different.

Any other ideas?


Thursday, August 30, 2018 9:52 AM

Thanks for pointing me in the right direction regarding duplicates.

I've only just started administering our environment, and assumed that everyone would be as sensible as me.

Turns out that the issue is being caused by the mailboxes having the same alias and/or displayname attributes.

I'll correct these and let you know if this is successful.


Thursday, August 30, 2018 11:41 AM

That seems to have done the trick. All mailboxes now have auditing turned on.

Thanks for your help.


Thursday, August 30, 2018 6:13 PM

You're welcome.  Happy to have helped.

Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
Celebrating 20 years of providing Exchange peer support!