Error reading properties from mailbox object GC://example.local/CN=UserName/OU=Users/DC=example/DC=local. Ensure this object is mail-enabled and has the mail, mailnickname, and legacyExchangeDN properties populated. Exception: index out of range. Must be non-negative and less than the size of the collection. Parameter name: index.
Disable and then enable mailbox using EMC or use disable/enable-mailbox -identity UserName cmdlet.
Clean-MailboxDatabase -Identity DBNAME can be used if mailbox doesn't appear in EMC/Disconnected Mailbox.