Answered by:
removing account in exchange does not remove AD Account?

Question
-
Hello,
I've heard everywhere that deleting a user in exchange removes the AD account as well (which is what I'm trying to do) but in my case, after deleting the exchange account, the user is still in AD...
I tried 2 commands to delete the user in Exchange, both with same results, no more account in exchange but still one in AD :(After disabling the mailbox, the 2 commands I tried are:
Remove-StoreMailbox -Database [DatabaseName] -Identity "[MailboxGuid#]" -MailboxState Disabled -Confirm:$False
Remove-Mailbox -Database [DatabaseName] -StoreMailboxIdentity "[MailboxGuid#]" -Confirm:$Falseany ideas??
Monday, November 4, 2013 5:34 PM
Answers
-
Please try this and let me know
Remove-Mailbox -Identity user -Permanent
Regards, Siva
- Proposed as answer by Sivakumar Ramalingam Tuesday, November 5, 2013 8:07 PM
- Marked as answer by cara chen Monday, November 18, 2013 1:55 AM
Monday, November 4, 2013 7:10 PM -
Hi Climbo,
Based on my knowlege, the Remove-Mailbox will delete the mailbox and the AD user object.
I have a test in my lab. When I run the Remove-Mailbox -Identity test7 cmdlet, both the test7 AD object and mailbox were removed. After you run the cmdlet, please click refresh on ADUC and see the result.
Hope it helps.
If you need further assistance, please feel free to let me know.
Best regards,
Amy- Proposed as answer by Sivakumar Ramalingam Tuesday, November 5, 2013 8:07 PM
- Marked as answer by cara chen Monday, November 18, 2013 1:55 AM
Tuesday, November 5, 2013 9:36 AM
All replies
-
Hello,
I've heard everywhere that deleting a user in exchange removes the AD account as well (which is what I'm trying to do) but in my case, after deleting the exchange account, the user is still in AD...
I tried 2 commands to delete the user in Exchange, both with same results, no more account in exchange but still one in AD :(
the 2 commands I tried are:
Remove-MailboxExportRequest -identity "[Account#]\mailboxexport" -Confirm:$False
Remove-Mailbox -Database [DatabaseName] -StoreMailboxIdentity "[MailboxGuid#]" -Confirm:$False
any ideas??
- Merged by cara chen Tuesday, November 5, 2013 9:44 AM repeated
Monday, November 4, 2013 5:03 PM -
The Remove-Mailbox will delete the exchange mailbox and delete the AD object as per design but in your case, if the remove command does not do the job, then i guess there are some AD OU level restrictions placed to accidental deletions. You may want to check with your Domain Admin.
Probably the account you are using does not have permission to delete the AD object.
Regards.
Regards, Siva
- Proposed as answer by Sivakumar Ramalingam Monday, November 4, 2013 5:40 PM
Monday, November 4, 2013 5:27 PM -
using the same account, if I use the Exchange console (2010) to delete the user, it is removed both in exchange AND ad... but when using the exchange command prompt, user stays in AD.
I assumed deletion permission would be the same when going through console or comment prompt?!
Monday, November 4, 2013 6:46 PM -
Please try this and let me know
Remove-Mailbox -Identity user -Permanent
Regards, Siva
- Proposed as answer by Sivakumar Ramalingam Tuesday, November 5, 2013 8:07 PM
- Marked as answer by cara chen Monday, November 18, 2013 1:55 AM
Monday, November 4, 2013 7:10 PM -
Hi Climbo,
Based on my knowlege, the Remove-Mailbox will delete the mailbox and the AD user object.
I have a test in my lab. When I run the Remove-Mailbox -Identity test7 cmdlet, both the test7 AD object and mailbox were removed. After you run the cmdlet, please click refresh on ADUC and see the result.
Hope it helps.
If you need further assistance, please feel free to let me know.
Best regards,
Amy- Proposed as answer by Sivakumar Ramalingam Tuesday, November 5, 2013 8:07 PM
- Marked as answer by cara chen Monday, November 18, 2013 1:55 AM
Tuesday, November 5, 2013 9:36 AM