DHCP migration

DHCP migration

How to Migrate a Windows DHCP Server: A Step-by-Step Guide.

Migrating core network services can make even seasoned sysadmins break a sweat. If it goes wrong, users immediately lose network access, and the helpdesk gets flooded.
Fortunately, migrating the Dynamic Host Configuration Protocol (DHCP) role to a new machine—such as upgrading to Windows Server 2025—is highly streamlined. Using modern PowerShell cmdlets, you can copy all scopes, active IP leases, and reservations with virtually zero user downtime.

Step 1: Pre-Migration Planning.

Before running any commands, minimize the risk of IP address conflicts.
  • Lower Lease Durations (Optional): A few days before the migration, consider lowering your scope lease duration (e.g., down to 2 hours). This ensures clients check back in with the network quickly, speeding up their transition to the new server.
  • Gather Network Info: Document your current scope configurations, exclusions, and active IP helper/relay addresses configured on your network switches.
  • Backup Everything: Take a virtual machine snapshot or full backup of your existing DHCP server before proceeding.

Step 2: Export DHCP Config from the Source Server.

Instead of using legacy netsh commands, use PowerShell to extract your full configuration alongside all active leases.
  1. Log into your old DHCP server as an Administrator.
  2. Open PowerShell as an Administrator and run the following:

PowerShell
# Create an export directory
New-Item -ItemType Directory -Path "C:\DhcpBackup"

# Export all scopes, leases, and reservations
Export-DhcpServer -ComputerName "pocx009ad01" -Leases -File "C:\DhcpBackup\DHCPConfig_20261005.xml" -Verbose

# Backup DHCP Server
Backup-DhcpServer -ComputerName pocx009ad01 "C:\DhcpBackup\Backup" -Verbose





Result after run command success.


Transfer the exported DHCPConfig.xml file over to the local storage of your new destination server.

Step 3: Install the DHCP Role on the Destination Server

Now, prepare your new Windows Server to take over the workload.
  1. Log into the new server.
  2. Open PowerShell as an Administrator and install the DHCP binary features:

Note: Can you install Windows feature via GUI.

Step 4: Import Config & Execute the Cutover.

To prevent a "split-brain" or duplicate IP situation on your network, seamlessly transition service from the old server to the new one.
  1. Stop the Old DHCP Service: On your old server, stop and disable the service so it immediately stops handing out IPs:

Result after run command sussess!, DHCP isn't running.



Import Data to the New Server: On your new server, import the data package you transferred earlier:





Authorize the New Server: If your environment uses Active Directory, authorize your new server to operate in the domain:



Result: Address Pool is compeleted!


Result: Address Leases is compeleted!


Result: Reservations is compeleted!

Result: Scope Options is compeleted!

Result: Client can receive IP address from new server.


Step 5: Post-Migration Cleanup & Verification
Your migration is functionally complete, but do not skip the final validation:
  • Update IP Helpers: If your network topology utilizes DHCP Relay Agents (IP Helpers on layer-3 switches or routers), update those configuration files to route toward your new server's IP address.
  • Test Client Connections: Boot a test workstation or run ipconfig /renew on an existing device. Verify that it pulls a proper configuration from the new server's hostname.
  • Deauthorize the Old Server: Once the new server handles traffic steadily, unauthorize the legacy server from Active Directory before completely decommissioning the underlying machine.

Comments