Link to home
Start Free TrialLog in
Avatar of Axis52401
Axis52401Flag for United States of America

asked on

Ad user remove ?

I deleted a user from AD instead of Exchange now can't delete the account in exchange. It gives some error about not being able to find it in AD. How can I remove this mail box now?
Avatar of Satish Auti
Satish Auti
Flag of India image

Run this command from EMC

Remove-Mailbox -Identity "USERNAME" -Permanent

Refer for better understanding...

http://howexchangeworks.com/2010/09/purge-disconnected-or-soft-deleted.html
Avatar of Axis52401

ASKER

It gives me the error
Missing an arguement for parameter
You will find the Mailbox as unlinked in the Disconnected Mailboxes and you'll be able to reattach the mailbox to a new/other user or delete it there.

If you have the AD Recycle Bin activated you can restore the AD account and reattach the mailbox to the existing account. I don't know if you have to reattach it manually since I've never done it myself...
have u enter the user account between "" which u deleted.
ASKER CERTIFIED SOLUTION
Avatar of Satish Auti
Satish Auti
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That mailbox doesn't show in the disconnected mailboxes it shows up in the regular list, I did put the users username in the command
You can use adrestore if you wanted to recover deleted user
OR
else you can create new AD user without mailbox with same login name as deleted one.
Also, run below command on exchange mailbox server
get-mailboxdatabase |clean-mailboxdatabase
Now you can view deleted user mailbox in disconnected mailbox post refresh
Now right click disconnected mailbox and select connect, it will connect the disconnected mailbox to user
now take .pst backup of mailbox if wanted to and then Disable (Not Remove) the mailbox from exchange mmc.
This will remove all exchnage attributes from user account, and also mark mailbox for deletion by moving it into disconnected mailbox container.
If everything happended perfectly and u are sure that user account is no longer needed, you can delete it as well.

below is the step by step
http://community.spiceworks.com/how_to/show/1388-recover-mailbox-after-delete-active-directory-user