Forum Discussion
Request for Official Cleanup Script to Retire Exchange 2016 After Migrating to Exchange SE
Subject: Request for Official Cleanup Script to Retire Exchange 2016 After Migrating to Exchange SE
Hi Exchange Team,
I've successfully migrated mail flow and management to Exchange Server Subscription Edition (SE) and am now preparing to retire our legacy Exchange 2016 server (EXCHANGE2016). I’ve followed the documented steps from the Decommissioning Exchange Server 2016 blog post, but I recall that a script—Cleanup-ExchangeLegacyServer.ps1—was referenced or released separately to automate the final cleanup. I’m unable to locate the actual script and would appreciate guidance on where to find it.
Here’s a summary of what I’ve completed so far:
Steps Completed
- Mail Flow Migration
- Reconfigured send connectors: Set-SendConnector "Outbound to Office 365" -SourceTransportServers @("EXCHANGESE")
- Verified SmartHost routing and TLS settings.
- Receive Connector Cleanup
- Disabled all receive connectors on EXCHANGE2016: Get-ReceiveConnector -Server EXCHANGE2016 | Disable-ReceiveConnector
- Mailbox Migration
- Moved all user, arbitration, audit log, and monitoring mailboxes: Get-Mailbox -Server EXCHANGE2016 Get-Mailbox -Server EXCHANGE2016 -Arbitration Get-Mailbox -Server EXCHANGE2016 -AuditLog Get-Mailbox -Server EXCHANGE2016 -Monitoring
- Queue Validation
- Confirmed no active queues on EXCHANGE2016.
- Connector Scope Audit
- Verified EXCHANGE2016 is no longer listed in any send connector: Get-SendConnector | Where-Object {$_.SourceTransportServers -contains "EXCHANGE2016"}
Remaining Question
Should I now:
- Run an official cleanup script (e.g., Cleanup-ExchangeLegacyServer.ps1) to safely remove EXCHANGE2016’s configuration objects while keeping Exchange SE intact?
- Or simply uninstall Exchange 2016 from EXCHANGE2016 and decommission the server manually?
I want to ensure I follow Microsoft’s best practices and avoid breaking hybrid management or leaving orphaned AD objects. If the script is available, could you please share the official download link and any updated guidance?
Thanks in advance for your help!
—Michael
I'm not aware of any script. All you need to do is uninstall Exchange from the server...this will take care of all the objects related to that server in AD.
2 Replies
- Dan_SnapeIron Contributor
I'm not aware of any script. All you need to do is uninstall Exchange from the server...this will take care of all the objects related to that server in AD.
- mrlovettCopper Contributor
Thank You, we followed your advise, and all is well in the world:
Decommissioning Exchange Server 2016 | Microsoft Community HubPS E:\> .\Setup.exe /mode:Uninstall /IAcceptExchangeServerLicenseTerms_DiagnosticDataOFF
Microsoft Exchange Server 2016 Cumulative Update 23 Unattended Setup
Mailbox role: Mailbox service
Mailbox role: Unified Messaging service
Mailbox role: Client Access service
Mailbox role: Transport service
Mailbox role: Front End Transport service
Mailbox role: Client Access Front End service
Management tools
LanguagesPerforming Microsoft Exchange Server Prerequisite Check
Configuring Prerequisites COMPLETED
Prerequisite Analysis COMPLETEDConfiguring Microsoft Exchange Server
Preparing Setup COMPLETED
Mailbox role: Mailbox service COMPLETED
Mailbox role: Unified Messaging service COMPLETED
Mailbox role: Client Access service COMPLETED
Mailbox role: Transport service COMPLETED
Mailbox role: Front End Transport service COMPLETED
Mailbox role: Client Access Front End service COMPLETED
Exchange Management Tools COMPLETED
Language Files COMPLETED
Stopping Services COMPLETED
Removing Exchange Files COMPLETED
Restoring Services COMPLETED
Finalizing Setup COMPLETEDThe Exchange Server setup operation completed successfully.