How to Migrate Windows DHCP Server to a new Server

They say all good things come to an end, and this is most certainly the case with Windows Server operating systems as they approach their end of mainstream support date. Smart admins and engineers will know exactly where each server sits in its support lifecycle and should have a clear understanding on what roles and services are hosted on each server. Why? Well, some day you’ll need to transition things to a new home and so having a clear understanding on how to deal with the roles and services is a good thing to get ahead of. Today, let’s look at transitioning DHCP services from one server to another.

Scenario: You are hosting DHCP on a Windows 2016 Server operating system and are aiming to phase out this server because it’s approaching the end of mainstream support. You want to migrate it to a new server running Windows Server 2022 or 2025.

Here’s how to transfer all DHCP scopes, IP leases, and Reservations from one server to another.

  1. Log in as an admin, on the old server
  2. Open Powershell as as admin and enter:
    Export-DhcpServer -File c:\DhcpData.xml -Leases -Force -ComputerName oldserver.domain.local -verbose
  3. De-authorize the old DHCP server
  4. Copy c:\DhcpData.xml to the new server
  5. Install and configure the DHCP Server role
  6. Start the DHCP service on the new server
  7. Enter the following commands, using Powershell as an admin. This will import the DHCP data to the new server
    New-Item -Path “C:\dhcp_backup” -ItemType Directory -Force
    Import-DhcpServer -File C:\DhcpExport.xml -BackupPath C:\dhcp_backup\ -Leases -ScopeOverwrite -Force -ComputerName newserver.domain.local -Verbose
  8. Restart the DHCP service on the new server
  9. Authorize the DHCP server
  10. Verify your scopes, leases, reservations. They should match the old server

Pro Tip: Are you using any IP Helpers on your switch VLAN configurations? If so, don’t forget to address them. While you’re at it, double check Scope Options like 003 Router, 006 DNS for accuracy.

Scroll to Top