how to uninstall exchange 2010 from Win 2008 R2

I have installed Exchange 2010 on windows server 2008 R2 64 bit OS for testing purpose, and now i need to uninstall it, i have tried but i can't uninstall, error shown in faild result is:

uninstall cannot continue .'Summary: 1 item(s). 0 succeeded, 1 failed.
Mailbox Role Prerequisites
Failed
Error:
Uninstall cannot continue.
Database 'Mailbox Database 1229298607': This mailbox database contains one or more mailboxes or arbitration mailboxes. To get a list of all mailboxes in this database, run the command Get-Mailbox -Database <Database ID>. To get a list of all arbitration mailboxes in this database, run the command Get-Mailbox -Database <Database ID> -Arbitration. Before you can remove this mailbox database, you must disable, move, or remove user mailboxes and move arbitration mailboxes.
Recommended Action: http://go.microsoft.com/fwlink/?linkid=30939&l=en&v=ExBPA.4&id=4a96fd69-9cec-4a48-9571-5c9e8ab3cfe9


 Attached as Image here.
........
Can someone give me any solution and exampel  to succesfully uninstall  exchange 2010 from Win 2008 R2?

Thankfully

Uninstall-exchange-2010-error.jpg
DoganaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RaghuvCommented:
The error message itself has the solution. Go ahead and delete the Mailboxes (Under Mailbox Database 1229298607) you must have created. Once all the mailboxes has been deleted, you will be able to uninstall Exchange 2010.
Mike ThomasConsultantCommented:
I had this issue on my lab the other week, first remove any mailboxes, if you still have an issue (Which I did) you can forcibly remove exchange 2010 by doing the following

(If this is your only exchange you want removing)

Open adsiedit.msc, open configuration > Services and delete CN=Microsoft Exchange (this removes the entire org)
If you jsut want 1 server gone go down 1 more lever to CN=Servers and remove your server.


Then Use Registry Editor to remove the following Exchange registry keys form the server itself

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DAVEX
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EXIFS
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ExIPC
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EXOLEDB
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IMAP4Svc
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeActiveSynchNotify
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeADDXA
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeAL
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeDSAccess
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeES
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeFBPublish
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeMGMT
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeMTA
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeMU
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeOMA
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeSA
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeSRS
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeTransport
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeWEB
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\POP3Svc
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RESvc


Then delete the exchange install files.


I reinstalled exchange after doing the above btw then broke it and removed it again and it still runs ok after reinstalling.

AkhaterSolutions ArchitectCommented:
from powershell run

Get-Mailbox -Database 'Mailbox Database 1229298607' | disable-mailbox

Get-Mailbox -Database 'Mailbox Database 1229298607' -Arbitration | disable-mailbox -arbitraion -DisableLastArbitrationMailboxAllowed :$true

and try again


Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

DoganaAuthor Commented:
Mr.Akhater-
I tryed this and i get the following...
------------------------------------------------------------
The term 'Get-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
 spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:12
+ Get-Mailbox <<<<  -Database 'Mailbox Database 1229298607' | disable-mailbox
    + CategoryInfo          : ObjectNotFound: (Get-Mailbox:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
--------------------------------------------------------------------------------------------------
AkhaterSolutions ArchitectCommented:
you ran the get-mailbox from the exchange management shell ?
DoganaAuthor Commented:
no. how?
AkhaterSolutions ArchitectCommented:
search for something called "Exchange Management Shell" run it as administrator

and run

Get-Mailbox -Database 'Mailbox Database 1229298607' | disable-mailbox

Get-Mailbox -Database 'Mailbox Database 1229298607' -Arbitration | disable-mailbox -arbitraion -DisableLastArbitrationMailboxAllowed :$true

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DoganaAuthor Commented:
I've done it. problem was that i didn,t ran from the exchange powershell. i 've run the same command as Akhater wrotte me, and now everything is ok.

thank you all.
 
AkhaterSolutions ArchitectCommented:
Glad i was able to help, if you are ok with the solution please close the question

thanks
DoganaAuthor Commented:
i've just done it. thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Server OS

From novice to tech pro — start learning today.