Need to uninstall Exchange 2016 from temp server

I setup a temp Exchange 2016 server, imported all the mail and attached the users.  After rebuilding the old server and installing Server 2016 and Exchange 2016 I migrated the mailboxes to the new server.  I now need to uninstall exchange from the temp server but I can't get to the EAC or the Exchange Powershell.  When I try to uninstall Exchange from Control Panel I get

Uninstall can't continue. Errors:
This mailbox database contains one or more mailboxes, mailbox plans, archive mailboxes, public folder...

What's the best way to uninstall Exchange under these conditions
Dstp7334ISAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Jeff GloverSr. Systems AdministratorCommented:
Whyy can't you use Powershell? Or the EAC for that matter? What errors are you getting? That is the biggest problem you have now.  For the database, you have to move the System mailboxes off it. (arbitration, etc...)
0
Dstp7334ISAuthor Commented:
New-PSSession : [mail.contoso.com] Connecting to remote server mail.contoso.com failed with the following
error message : The client cannot connect to the destination specified in the request. Verify that the service on the
destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service
running on the destination, most commonly IIS or WinRM

Everything has been moved to the other server.
0
Jeff GloverSr. Systems AdministratorCommented:
Try this

$s = New-PSSession –ConfigurationName Microsoft.Exchange –ConnectionUri http://<FQDN of the temp Exchange server>/powershell -Authentication Kerberos
Import-PSSession $s
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Todd NelsonSystems EngineerCommented:
You will need to move the system mailboxes to the new server if they aren't already.  Use the following command to check what server the system (arbitration) mailboxes currently reside and then move any that are currently on the old server.

Get-Mailbox -Arbitration

Open in new window


Also, you'll need to move any archive mailboxes, and may want to think about moving the DiscoverySearchMailbox if there is not one on the new server.

All mailboxes will have to be removed from the database in question before the database can be removed.  Have you attempted removing the mailbox database(s) yet from the server you are attempting to remove?

Get-MailboxDatabase

Open in new window


Remove-MailboxDatabase

Open in new window


Additionally, take a look at this reference, as there may be an issue with an AD object that is assigned an incorrect homeMDB ... Unable to Delete Mailbox Database
0
Valentina PerezExchange ServersCommented:
Hi,

Before uninstalling Exchange, have you shutdown the temporary server? After shutdown the server, the new exchange server works?

And you need to make sure that all arbitration mailbox and archive mailbox have been migrated.

Check if the database exists:

Get-MailboxDatabase -server "servername"

Regards
Valentina
0
Dstp7334ISAuthor Commented:
New-PSSession : A positional parameter cannot be found that accepts argument 'Import-PSSession'.
0
Todd NelsonSystems EngineerCommented:
Can you run the commands from the new server?
0
Dstp7334ISAuthor Commented:
Todd - command won't run on the new server either, same message.  All arbitration mailboxes are on the old server (the one to be replaced)
0
Jeff GloverSr. Systems AdministratorCommented:
You do know that the commands I gave you can run from your desktop as long as you have Windows 7 or above. And it is 2 separate commands. The first line assigns a command to the variable $S and the second line uses that string to start import-pssession. Import-PsSession is a normal powershell command. What I sent you allows you to run a remote Exchange Management Shell from a computer without any Exchange tools installed.
  As long as IIS is installed and running on the old Server and the Powershell Virtual Directory exists, you should be able to connect.
0
Todd NelsonSystems EngineerCommented:
Are the bindings for 'https' in IIS set with a valid Exchange certificate?  Check both "Default Web Site" and "Exchange Back End" sites.  If not, set for each 'https' type and run IISRESET on both servers.

Also, check to ensure all of the Exchange services, set for automatic startup, are started and running.
0
Dstp7334ISAuthor Commented:
all arbitration mailboxes moved.  still shows old and new databases using get-mailboxdatabase.

old database has two mailboxes, a discovery search mailbox and a jobs mailbox
0
Todd NelsonSystems EngineerCommented:
Does the new database have a discovery search mailbox?  If not, you will need to move it too,.  Not sure what the "jobs" mailbox is bet it will need to be deleted or moved as well.
0
Jeff GloverSr. Systems AdministratorCommented:
Try this to move the discovery search mailbox

Get-Mailbox -Filter { RecipientTypeDetails -eq "DiscoveryMailbox" } | new-moverequest -targetdatabase xxxxxx

For jobs, not sure what that is.
0
Dstp7334ISAuthor Commented:
now there are no mailboxes in the old database
0
Todd NelsonSystems EngineerCommented:
If there are no more mailboxes in the database, delete the database using the remove-mailboxdatabase command...

https://technet.microsoft.com/en-us/library/aa997931(v=exchg.160).aspx

After you have removed the database, perform the uninstall of Exchange.
0

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
Jeff GloverSr. Systems AdministratorCommented:
So, now if you want to Uninstall the temp server, it should be OK.
0
PberSolutions ArchitectCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Todd Nelson (https:#a42400307)
-- lvjeff (https:#a42400281)
-- lvjeff (https:#a42400308)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Pber
Experts-Exchange Cleanup Volunteer
0
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
Powershell

From novice to tech pro — start learning today.