I was asked to rename an Exchange account (sitting on an Exchange 2010 SP2 server) for a customer today because the surname had changed so to do this tidily, I disabled the Exchange Mailbox, cleaned up the Databases to make the mailbox appear in the Detached Mailboxes folder using the following Exchange Management Shell command:
get-mailboxdatabase | clean-mailboxdatabase
Once that had run, I then deleted the AD user account, created a new AD user account and then Connected the Detached Mailbox to the new AD user account.
All done – I then informed the user of the new login credentials and they then setup their Outlook account accordingly.
It was then that the problem occurred. They couldn’t login to their account. They tried OWA and that failed too, saying that the account was disabled! What the heck?
I tried using OWA and also got Account Disabled and saw the following error message when expanding the error:
Exception type: Microsoft.Exchange.Data.Storage.AccountDisabledException
I checked the AD account and it wasn’t disabled. Forced an AD Replication and that made no difference. I disabled the account – replicated AD – enabled the account – replicated AD again and still couldn’t login to OWA.
After a few checks and some head scratching, I re-ran
get-mailboxdatabase | clean-mailboxdatabase
and then was able to login to OWA as the user and they could login to Outlook.
Filed under: Exchange 2010, Exchange Server, SBS 2011 | Tagged: Cannot Login After Account Renamed, Exception type: Microsoft.Exchange.Data.Storage.AccountDisabledException, exchange 2010, Exchange 2010 SP2, Rename Exchange Account |
I sat here for hours trying to figure this out as well. thanks for posting this. i ran the command beforehand to see the disconnected MB but didnt think i would need to run it a second time!! Thanks!
You are welcome – it threw me for a while too, so felt it needed to be shared.
Alan
It’s workable on my site too, thanks for the sharing.
You are welcome.
Tried this first time and works fantastic! Thank you very much!
You are welcome Andy – glad it was helpful.
Alan
Excellent – what would we do without the internet? Thanks for the share
You are welcome. We would probably all be bald and frustrated without the internet.
Alan
After disabled and reconning mailbox I waited for replication to finish.Because I reconnected mailbox and try to open outlook and got same error message .So I thought to wait for while and again try to open OWA and Outlook and It works .Outlook & OWA open successfully
Thanks lot .
Thank you, it is very helpfull for us.
Thank you sooo much for sharing this valuable information! you saved my life..and my day 🙂
Thanks Alan, you just saved my bacon!
Worked here also. Thanks a million.
The best post we ever found!!! Or maybe…the post we most wanted after a long, long, long search time… Thanks for this. Hessel (from Holland).
Glad that it helped – it’s a weird issue and having to run the command twice doesn’t make much sense, but it does relieve the pain 😉
Alan
Why would you disable the mailbox, which then loses all SMTP, x500, LegacyExchangeDN addresses, SID and other attributes, instead of just changing the user’s last name, login/UPN, adding a new e-mail address, and making it the primary?
Hi Jason,
It was a new account and the user name was given to me incorrectly, so it didn’t matter that the other Exchange attributes would be lost as no-one had used the account and no-one had emailed the account internally.
Alan
Great Tip….found it by Google-ing under heavy pressure (VIP mailbox 🙂
get-mailboxdatabase | clean-mailboxdatabase – did the trick.
Great!!
Thanks, worked a treat.
thsnk you man you rock!! i was going crazy over this
Many Thanks Alan 🙂
You’re welcome. Hopefully it didn’t take you too long to find and fix.