How to Migrate DHCP Between Windows Servers Without Downtime

DHCP migrations have a bad reputation because getting them wrong means every device on the affected subnet loses its lease and can’t renew, but Windows Server has had a clean export/import path for this since Server 2012, and done properly it’s a non-event for end users. Use Export-DhcpServer and Import-DhcpServer. Don’t try to migrate the […]

How to Migrate DHCP Between Windows Servers Without Downtime. Featured image

DHCP migrations have a bad reputation because getting them wrong means every device on the affected subnet loses its lease and can’t renew, but Windows Server has had a clean export/import path for this since Server 2012, and done properly it’s a non-event for end users.

  • Use Export-DhcpServer and Import-DhcpServer. Don’t try to migrate the registry or database files manually
  • The old server must be stopped (or the scopes deactivated) before the new server activates the same scopes
  • Consider DHCP failover instead of a one-time migration if you want ongoing redundancy
  • Always export a backup even if you’re only testing

Step 1: Export the configuration from the source server

On the existing DHCP server, export every scope and its settings to a file:

Export-DhcpServer -ComputerName "OldDHCP01" -Leases -File "C:\dhcp-export.xml"

Including -Leases preserves active lease data, which matters if you want a truly seamless cutover. Clients that already have a lease won’t need to request a new one immediately.

Step 2: Deactivate scopes on the old server

Before importing anywhere else, deactivate the scopes on the source server so two DHCP servers are never simultaneously handing out addresses from the same range:

Set-DhcpServerv4Scope -ScopeId 10.0.1.0 -State InActive

Step 3: Import on the new server and activate

Install the DHCP role on the new server, then import the file and activate the scopes:

Import-DhcpServer -ComputerName "NewDHCP01" -Leases -File "C:\dhcp-export.xml" -BackupPath "C:\dhcp-backup"

Verify scopes came across correctly with Get-DhcpServerv4Scope, then activate each one. Update any DHCP relay agents or IP helper addresses on your routers/switches to point at the new server’s IP before finishing.

Consider DHCP failover instead

If you’re migrating specifically to get onto new hardware but would also like ongoing redundancy, set up DHCP failover between old and new rather than a hard cutover. It lets both servers serve the same scope simultaneously and gives you a rollback path if something looks wrong on the new server, rather than a single point-in-time switch.

For official guidance, see Microsoft’s Windows Server documentation.

🛠️

Gear We Recommend

Testing configs is easier with a dedicated admin machine set up right. Here’s the kit we use.

Browse our Windows Admin Toolkit picks on Amazon

As an Amazon Associate, TechyGeeksHome earns from qualifying purchases.


Discover more from TechyGeeksHome

Subscribe to get the latest posts sent to your email.

Andrew Armstrong

Andrew Armstrong is a UK-based IT professional with 26+ years of hands-on experience in Windows, Windows Server, SCCM/ConfigMgr, Active Directory, PowerShell, and enterprise infrastructure.

He founded TechyGeeksHome in 2010 and has published over 1,500 practical guides covering real-world IT problems and solutions. When not solving IT problems,

Andrew develops free Windows utilities including Ultimate Settings Panel, which has been downloaded over 850,000 times.