Local Support. Enterprise Solutions.
(770) 377-8546   •   support@ngcci.com
Windows Server Technical Guide

How to Move DHCP from One Windows Server to Another

Updated guide: The original version of this article used netsh. For current Windows Server migrations, PowerShell's Export-DhcpServer and Import-DhcpServer cmdlets are the preferred method. This procedure applies to Windows Server 2016, 2019, 2022 and 2025.

Moving DHCP to a replacement Windows Server is usually straightforward when you export the existing configuration and import it on the new server. The migration can preserve your scopes, reservations, options, policies, and—if you choose—active lease information.

The goal is to move DHCP without changing the addressing your clients receive and without accidentally leaving two active DHCP servers serving the same scopes.

Before you begin

  • Confirm you have a current backup of the existing DHCP server.
  • Document the old server's IP address, DNS settings, DHCP bindings, scopes, exclusions, reservations and options.
  • Install the DHCP Server role on the destination Windows Server.
  • If the servers are domain joined, make sure you have permission to authorize the replacement DHCP server in Active Directory.
  • Plan a short maintenance window for the final cutover.

1. Export the existing DHCP configuration

Open an elevated PowerShell window on the existing DHCP server. Create an export folder and export the DHCP configuration and lease database:

New-Item -Path C:\DHCP-Migration -ItemType Directory -Force

Export-DhcpServer `
  -ComputerName $env:COMPUTERNAME `
  -File "C:\DHCP-Migration\dhcp-export.xml" `
  -Leases `
  -Force

The -Leases parameter includes current lease data. If you only want the server configuration and scopes, omit -Leases.

Optional: Verify the scopes before migration

Get-DhcpServerv4Scope |
  Select-Object ScopeId,Name,State,StartRange,EndRange,SubnetMask

You can also capture reservations and options for comparison after the import:

Get-DhcpServerv4Reservation -ScopeId 192.168.1.0

Get-DhcpServerv4OptionValue

2. Install DHCP on the new server

If the DHCP Server role has not already been installed, run:

Install-WindowsFeature DHCP -IncludeManagementTools

After installation, copy dhcp-export.xml from the old server to the new server—for example, to C:\DHCP-Migration\.

3. Import the configuration on the new server

Create a backup folder first:

New-Item -Path C:\DHCP-Backup -ItemType Directory -Force

Then import the DHCP configuration and leases:

Import-DhcpServer `
  -ComputerName $env:COMPUTERNAME `
  -File "C:\DHCP-Migration\dhcp-export.xml" `
  -BackupPath "C:\DHCP-Backup" `
  -Leases `
  -Force

If the destination already contains one or more of the scopes being imported and you intentionally want to replace them, use -ScopeOverwrite. Do not use that option casually on a production server.

4. Authorize the new DHCP server

In an Active Directory domain, an unauthorized Windows DHCP server will not normally issue leases. After confirming the new server's network configuration, authorize it:

Add-DhcpServerInDC `
  -DnsName "NEW-DHCP-SERVER.yourdomain.local" `
  -IPAddress 192.168.1.10

Replace the example server name and address with the actual values for your environment.

5. Verify the migration

Before you complete the cutover, compare the new server with the old one.

Get-DhcpServerv4Scope

Get-DhcpServerv4OptionValue

Get-DhcpServerv4Statistics

For each important scope, verify:

  • Start and end address ranges
  • Exclusion ranges
  • Reservations
  • Router/default gateway option
  • DNS server and DNS domain options
  • Lease duration
  • Scope state
  • Policies and vendor/user-class options, if used
  • Active leases, if you exported them

6. Perform the cutover

Important: Do not leave both DHCP servers actively serving the same scopes unless you have intentionally configured DHCP failover. Two independent servers handing out addresses from the same scope can cause duplicate-address and configuration problems.

A clean cutover usually looks like this:

  1. Stop or disable DHCP on the old server.
  2. Confirm the new DHCP server is authorized.
  3. Start the DHCP Server service on the new server.
  4. Activate the imported scopes if necessary.
  5. Renew a test client's lease and confirm it receives the expected IP address, gateway and DNS settings.
  6. Monitor DHCP logs and lease activity before decommissioning the old server.

You can restart the DHCP service with:

Restart-Service DHCPServer

What about DHCP failover?

If your environment uses Windows DHCP failover, treat that as a separate migration step. Do not simply run two independent DHCP servers with overlapping scopes. Review the failover relationships, partner server, replication state and lease ownership before changing the production configuration.

Legacy method: NETSH

The original 2016 version of this article used the following commands:

netsh dhcp server export dhcp.txt all

netsh dhcp server import dhcp.txt all

Those commands may still be encountered on older systems and in older documentation. For current Windows Server migrations, NGCCI recommends using the DHCP PowerShell cmdlets shown above because they provide clearer support for scopes, leases and modern Windows Server administration.

Final recommendation

Do not decommission the old server immediately after the import. Keep it available—but with DHCP stopped—until you have verified that clients are receiving leases correctly and that all scopes, reservations and options were transferred as expected.

Technical basis: Microsoft Windows Server DHCP migration guidance and the Microsoft DHCPServer PowerShell module documentation. Commands should be tested in your environment before production use.