Foreword
This series of articles deals with the manual removal of an Exchange 2016 server from the Active Directory. This procedure should only be used in special cases. The following cases come into question:
- There was already an Exchange installation "earlier" that is incomplete or faulty
- The Exchange server has burned down and cannot be restored via disaster recovery (no backup available, AD computer account deleted)
- A new Exchange Server is to be installed in a mishandled Active Directory in which one or both of the above points apply
The procedure described below must be carried out with caution and is FINAL. So please read carefully and make sure you create a backup of the domain controller.
If the Exchange Server computer account still exists, a disaster recovery should be attempted first. Manual removal is a last resort.
Surroundings
This article refers to an Active Directory in which the only Exchange 2016 server has been destroyed and cannot be restored from the backup. However, the domain controller on another server is still intact. So let's assume that the Exchange server named FWCOMEX1 was first struck by lightning, as a result of which the server burned down and a water pipe broke due to the heat, flooding the server:
After a recovery no longer worked because the AD computer account had already been deleted and all recovery attempts had failed, it is now time to start all over again. There is even a small glimmer of hope for the data. So FWCOMEX1 has been buried with dignity:
Procedure
The order in which you proceed doesn't really matter, I'll start with the DNS. All of the steps mentioned here take place on the domain controller FWCOMDC1.
Remove DNS entries
Depending on the configuration, there are several entries in the DNS that point to the broken Exchange server. The entries can usually be easily identified using the IP address. These entries are deleted:
Depending on the configuration, an SRV record for Autodiscover may also exist in the DNS zone. This will also be deleted:
The same applies to the reverse lookup zone, everything with the IP of the Exchange server is deleted (if available)
Delete configuration from Active Directory
After the DNS entries have been deleted, the Exchange configuration can be deleted from the Active Directory configuration partition. To do this, first connect to the configuration partition using ADSIEdit:
Under "Services" you will find the two entries "Microsoft Exchange" and "Microsoft Exchange Autodiscover". Both are deleted:
Then connect to the naming context. The entries "Microsoft Exchange Security Groups" and "Microsoft Exchange System Object" are now deleted here:
Continue with the "Active Directory Users and Computers" console. All Exchange system mailboxes are deleted in the Users OU:
The Exchange configuration is already history.
Resetting the attributes of user accounts
The AD user accounts also contain attributes that refer to the Exchange Server. The easiest way to reset the attributes is via PowerShell, as there are quite a few attributes involved. For a single user it works with the following command:
Get-ADUser frank | Set-ADUser -Clear msExchAddressBookFlags,msExchArchiveGUID,msExchArchiveName,msExchArchiveQuota,msExchArchiveWarnQuota,msExchBypassAudit,msExchCalendarLoggingQuota,msExchDumpsterQuota,msExchDumpsterWarningQuota,msExchELCMailboxFlags,msExchGroupSecurityFlags,msExchHomeServerName,msExchMailboxAuditEnable,msExchMailboxAuditLogAgeLimit,msExchMailboxGuid,msExchMailboxSecurityDescriptor,msExchMDBRulesQuota,msExchModerationFlags,msExchPoliciesIncluded,msExchProvisioningFlags,msExchRecipientDisplayType,msExchRecipientSoftDeletedStatus,msExchRecipientTypeDetails,msExchTextMessagingState,msExchTransportRecipientSettingsFlags,msExchUMDtmfMap,msExchUMEnabledFlags2,msExchUserAccountControl,msExchWhenMailboxCreated,showInAddressBook,proxyAddresses,legacyExchangeDN
The following command can be used for all users:
Get-ADUser -filter * | Set-ADUser -Clear msExchAddressBookFlags,msExchArchiveGUID,msExchArchiveName,msExchArchiveQuota,msExchArchiveWarnQuota,msExchBypassAudit,msExchCalendarLoggingQuota,msExchDumpsterQuota,msExchDumpsterWarningQuota,msExchELCMailboxFlags,msExchGroupSecurityFlags,msExchHomeServerName,msExchMailboxAuditEnable,msExchMailboxAuditLogAgeLimit,msExchMailboxGuid,msExchMailboxSecurityDescriptor,msExchMDBRulesQuota,msExchModerationFlags,msExchPoliciesIncluded,msExchProvisioningFlags,msExchRecipientDisplayType,msExchRecipientSoftDeletedStatus,msExchRecipientTypeDetails,msExchTextMessagingState,msExchTransportRecipientSettingsFlags,msExchUMDtmfMap,msExchUMEnabledFlags2,msExchUserAccountControl,msExchWhenMailboxCreated,showInAddressBook,proxyAddresses,legacyExchangeDN
Now the Exchange configuration of the mailboxes is also history.
Delete computer account
If the computer account of the Exchange Server still exists, it can also be deleted:
Installing a new Exchange Server
Before a new Exchange Server with a new name is installed, the Active Directory should be prepared once via the command line so that the necessary entries are created again.
There is a separate article on this.
Ich habe folgendes Problem:
Wir haben 2 Standorte: Köln (Mutter) und Berlin (Tochter) per VPN verbunden.
Eine Domain, Verwaltung ist und bleibt in Köln, Berlin wird geschlossen.
Köln hat ein Exchange Server und Berlin hat ein Exchange Server.
Der Berliner Exchange Server erhält seine Mails vom Kölner Exchange Server.
Die Domain soll in Köln weiter bestehen.
Ich habe die Berliner Kollegen bereits alle deaktiviert.
Kann ich den Berliner Exchange Server mit der Anleitung oben sauber aus der Domäne schmeissen oder wäre das besser mit einer Deinstallation des Berliner Exchange Servers?
Hi Frank,
das meiste hat soweit geklappt. Der Exchange meckert allerdings noch immer rum:
Dieser Computer ist als Quell-Transport-Server für 1 Connectors in der Organisation konfiguriert. Diese müssen verschoben oder gelöscht werden, bevor Setup fortgesetzt werden kann.
Weitere Informationen finden Sie unter: http://technet.microsoft.com/library(EXCHG.150)/ms.exch.setupreadiness.ServerIsSourceForSendConnector.aspx
Da die Powershell für den Exchange nicht funktioniert lassen sich die Connectoren darüber auch nicht deinstallieren. Weißt du einen Rat?
Beste Grüße Maik
Hallo Frank,
ich habe den versautes Exchange wie oben beschrieben entfernt. Auch das Script zur Bereingung der User durch geführt.
Nachdem erfolgreichen Installieren des Ex 2016 werden aber in der ECS die User die schon mal ein Postfach hatten nicht mehr angezeigt.
Hast du mir dazu noch einen Tipp?
Übrigens super hilfreiche Seite von dir!
Hallo,
auch wenn der Post vielleicht schon etwas her ist. Wir haben das gleiche Phänomen gehabt. Wenn ma in den Atributen der User im DC den mail nicknamen löscht werden sie im ECS angezeigt.
Gruß
Hallo,
ich habe eine bestehende Domäne mit einem gut laufenden Exchange 2010. Nun wollte ich den Exchange 2016 daneben installieren um dann eine Migration zu starten. Leider ist es dabei zu einem Problem bei der Installation des 2016 gekommen, welche kann ich noch nicht mal nachvollziehen. Wenn ich nun ein m:RecoverServer starte wird es abgebrochen, auch ein DisasterRecover ist nicht möglich, der Server kann auch nicht über „uninstall“ deinstalliert werden :-(
Sicherlich könnte ich die virtuelle Maschine auf der es installiert ist löschen, aber dennoch bleiben Fragmente in der AD und ich kann keine neue Installtion starten.
Wenn ich nun die von Dir hier angegeben Dateien lösche, laufe ich doch mit an Sicherheit grenzender Wahrscheinlichkeit Gefahr meinen bisherigen 2010er auch zu killen.
Was gibt es noch für Möglichkeiten?
Über Antworten wäre ich sehr dankbar.
Gruß
Michael
Hi Michael,
hier ist das Vorgehen beschrieben:
https://www.frankysweb.de/exchange-2016-manuelles-entfernen-eines-exchange-servers-mehrere-server/
Gruß,
Frank
Kann Microsoft Exchange Security groups nicht Löschen Zugriff verweigert
00000005 SecErr: DISD-31526D0 problem 4003 INSUFF_access_rights
dabei füre ich es im ADSI Editor auf dem DC aus
Moin Frank, vielen Dank.
Gruß, Manuel
Hallo Frank,
ich habe folgendes Problem.
Nachdem ich, dank deines Blogs und diversen Testinstallationen, Exchange2016 mit 4 externe Domains die bei 2 verschiedenen Providern gehostet sind, eingerichtet hab und alles funktioniert, incl. Autodiscover, in OL2010, OL 2016, iPhone, Galaxy, (Zertifikate von AD-Zertifikatdienste) habe ich gestern eine Firewall installiert, eine Watchguard Firebox T30.
Sobald die Firebox ins Spiel kommt, hat der DC Probleme mit der Namensauflösung.
Ping vom DC aus oder umgekehrt funktioniert sowohl auf dem „external interface“ (Fritzbox 192.178.178.1/24) und auch auf dem „Trusted Interface“ (192.168.168.1/24 einwandfrei, nslookup funktioniert nur wenn ich IPv6 deaktiviere (kommt sonnst die Fehlermeldung DNS request timed out Standardserver UnKnow), der DC kommt aber trotzdem nicht ins Netz.
Wenn ich einen neuen DC-Server aufsetze oder den DC herabstufe und DNS neu installiere und den wieder hochstufe, dann funktioniert es aber nur wenn die Installation mit angeschlossener Firebox erfolgt. Habe heute den ganzen Tag getestet und bin jetzt am überlegen ob ich den Exchange-Server aus der Domain nehme, denn DC neu installiere und dann den Exchange-Server wieder einbinde (geht das überhaupt?). Oder lieber alles neu?
Was meinst Du?
Trotzdem würde ich den Fehler gerne finden, falls es aus welchen Gründen auch immer nochmal passiert.
Danke und Gruß
Manuel
Hi Manuel,
schau dir diesen Artikel mal an. Ich denke das beschreibt dein Problem ganz gut:
https://www.frankysweb.de/active-directory-ipv6-fritzbox-sophos-utm-domain-controller/
Gruß,
Frank
Klasse … hat geklappt …
Wieso darf der alte Computername nicht wieder verwendet werden?