How to remove Exchange server from DAG

Bjorn Dirchsen
Bjorn Dirchsen used Ask the Experts™
on
Ok. We have a dual Exchange 2013 setup - EX1 and EX2 - in a DAG . Both servers has the Mailbox & CAS roles
I want to kill the DAG and only have one Exchangeserver being the server EX1.
I've removed the mailbox databases from the EX2 server. But I still have a ton of mailboxes (58) that is on the EX2 server.

[PS] C:\>get-mailbox -server EX2 | sort-object name reveals:
Name          Alias   ServerName       ProhibitSendQuota
----          -----   ----------       -----------------
room1         room1   EX2	         Unlimited
room2         room2   EX2	         Unlimited
user1         user1   EX2	         Unlimited
user2         user2   EX2	         Unlimited

Open in new window

How do I move the mailboxes to the EX1 server?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
MASEE Solution Guide - Technical Dept Head
Most Valuable Expert 2017

Commented:
Hi Bjorn Dirchsen,
Please use this article to move mailboxes to another database.
https://www.experts-exchange.com/articles/31741/Move-mailboxes-in-bulk-or-one-by-one-to-another-database-in-Exchange-2010-2013-2016.html?headerLink=workspace_article

Use this command to see the databases and server
Get-MailboxDatabase | ft name,server

Open in new window


Use this to move all mailboxes to  one database to another
Get-Mailbox -Database Mailboxdboldserver | New-MoveRequest - TargetDatabase Mailboxdbnewserver -BatchName "Mailboxdboldtomailboxdbnew"

Open in new window

Author

Commented:
@mas - thank you for the link. All mailboxes are in one Mailbox database - "Mailbox Database Exchange 2013" on EX1. So I don't understand what all the mailboxes are doing on EX2.

[PS] C:\>Get-MailboxDatabase  -identity "Mailbox Database Exchange 2013"

Name                           Server          Recovery        ReplicationType
----                           ------          --------        ---------------
Mailbox Database Exchange 2013 EX1             False           None

Open in new window

Solutions Architect
Commented:
don't rely on you command, since you have a dag the mailboxes are in a db (obviously) which can be hosted on any of the servers in the dag

instead
1. remove the DB copies from EX2
2. remove EX2 from the dag (Remove-DatabaseAvailabilityGroupServer)
3. remove ex1 from your dag (Remove-DatabaseAvailabilityGroupServer)
4. delete your dag (Remove-DatabaseAvailabilityGroup)
Ensure you’re charging the right price for your IT

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

MASEE Solution Guide - Technical Dept Head
Most Valuable Expert 2017

Commented:
As commented by Akhater please remove copies
This will remove all copies from EX2 and remove EX2 from DAG.
Get-MailboxDatabaseCopyStatus -Server EX2 | Remove-MailboxDatabaseCopy
Remove-DatabaseAvailabilityGroupServer -Identity ExDAG -MailboxServer EX2

Open in new window

AmitIT Architect
Distinguished Expert 2017

Commented:
Check my KB:
https://www.experts-exchange.com/articles/18110/How-To-Recover-Failed-Mailbox-Sever-In-Exchange-2010-DAG-Environment.html?headerLink=workspace_article

I wrote this to recover failed server, however you can just follow steps for removing. It is for 2010, however most of the steps will be similar for 2013.

Author

Commented:
Ok. I'll give it a try in our test environment :)

Thanks everyone for your help so far. I'll keep you posted with my findings.

Author

Commented:
Hmm. After removing both server Ex1 and EX2 from the DAG, Removing the DAG and uninstalling Exchange from EX2 (EX2 is stil a Domain member server, but no Exchange on it), i still see people on the EX2 when I issue the Get-Mailbox command.

Name          Alias   ServerName       ProhibitSendQuota
----          -----   ----------       -----------------
room1         room1   EX2	         Unlimited
room2         room2   EX2	         Unlimited
user1         user1   EX2	         Unlimited
user2         user2   EX2	         Unlimited

Open in new window


Funny, issuing the command:

[PS] C:\Windows\system32>get-mailbox -server EX2 returns:

Exchange server "EX2" was not found. Please make sure you typed...

I'm at a loss here...
AmitIT Architect
Distinguished Expert 2017

Commented:
Wait for AD replication, also now your can remove Ex2 from AD.

Author

Commented:
Ok. Found the reason for the strange behaviour of the Get-mailbox command in this article:

Get-Mailbox does not reflect the correct Server name for Mailboxes on databases for a DAG

Author

Commented:
Ok. Final question regarding this server decommissionning:

I'm not able to send e-mail (at all) from the OWA to any user in the organisation. The webmail says
Capture.JPG
This appeared after the removal of the EX2 server and DAG.

Any clues?
AkhaterSolutions Architect

Commented:
Yes I told you to ignore the server in a dag ☺

Regarding your other question, since it is not related to the original one and to be fair with all experts, please consider opening a new thread for it

Thanks

Author

Commented:
Thanks everyone for the support. I've (almost) succesfully shut down the EX2 and the DAG. The server is operational, but with an (possible directly unrelated) issue with the OWA.

Thanks, guys!
AmitIT Architect
Distinguished Expert 2017

Commented:
I advise you to recycle your Ex1 server during off hours and check it. Lot of time reboot fixes the issue.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial