Skip to content

How to Migrate DHCP Scopes to a New Windows Server Print

  • 0

Migrating DHCP scopes safely requires more than importing address ranges. Clients depend on leases, reservations, options, policies, relay paths and the server's authority to issue addresses. The main operational hazard is two independent servers issuing addresses from the same scope without a supported failover relationship. Plan the final export and activation so one intended service remains authoritative throughout the change.

This guide describes a standalone Windows DHCP server migration using the DhcpServer PowerShell module. Existing DHCP failover relationships need their own supported migration sequence; do not import an active failover scope into an unrelated server and start serving it. The example names and documentation-range addresses are illustrative and must be replaced.

Inventory the complete DHCP service

Record the source server name, static IP address, authorized-domain entry, IPv4 scopes, IPv6 configuration and relay destinations. List exclusions, reservations, lease durations, scope state, server and scope options, policies, vendor classes, user classes and DNS dynamic-update behavior. Identify options that refer to the old server itself.

Check whether the source also hosts DNS, AD DS or another role. Moving DHCP does not migrate those services. If clients receive the old server's IP as a DNS resolver, that option must reflect the actual DNS service plan rather than the new DHCP server's address automatically.

Inspect failover and current scope usage before selecting the workflow:

Get-DhcpServerv4Scope -ComputerName dhcp-old.example.internal
Get-DhcpServerv4Failover -ComputerName dhcp-old.example.internal
Get-DhcpServerv4Statistics -ComputerName dhcp-old.example.internal
Get-DhcpServerInDC

Save the output and investigate scopes close to exhaustion. A migration window is a poor time to discover that the existing pool has no spare addresses. Retain a normal supported DHCP backup in addition to the migration export.

Prepare the destination without exposing overlapping service

Build and patch the destination Windows Server, assign its final static network configuration and verify domain connectivity, DNS and time. Install the role and tools:

Install-WindowsFeature DHCP -IncludeManagementTools

Complete the required role post-installation and security-group configuration through the supported workflow. Ensure the destination has the appropriate permissions, firewall paths and monitoring. Keep it from serving imported overlapping scopes until the cutover decision. Use controlled service state, scope state and network access according to the plan; do not rely solely on nobody having configured a relay yet.

Decide whether the destination keeps a new IP address or assumes the old address. A new address requires updates to router IP helpers, relay agents, access-control lists and management systems. Reusing an address requires a carefully sequenced handover with no simultaneous ownership and may affect other roles if the source was shared.

Rehearse export and import in a controlled environment

Use an elevated session with the DhcpServer module and authorized administrative access. The export can include both configuration and leases:

New-Item -ItemType Directory C:\DHCP-Migration -Force
Export-DhcpServer -ComputerName dhcp-old.example.internal `
    -File C:\DHCP-Migration\dhcp-export.xml -Leases

The -Leases switch matters: without it, the export does not include the active lease database. A selected-scope export also includes server-level settings, so inspect what will affect an existing destination. Protect the XML file because it contains internal network configuration and device information.

Rehearse the import to a suitable isolated or otherwise nonserving test destination. Do not let a rehearsal answer production requests. Record import warnings and compare the resulting scopes, options and policies with the inventory. This reveals version or configuration differences before the final outage.

Take a final lease-aware export during cutover

Choose a maintenance window and confirm the source can be stopped or isolated promptly after the final export. A preliminary export taken days earlier is not a reliable final lease state. Quiesce the source according to the approved process, take the final export and prevent further lease changes on the old service before activating the replacement.

For a straightforward same-network cutover, stop the old DHCP service and remove its domain authorization when appropriate. Do not deauthorize another server or a failover partner by matching only a familiar-looking name. Verify the exact old DNS name and IP from the saved record.

Existing clients normally keep their current leases until renewal, so a brief controlled DHCP outage may not immediately disconnect them. That does not make the change risk-free: new clients, expired leases and devices rebooting during the window can be affected. Plan validation on each relevant subnet.

Import on the destination and inspect warnings

Copy the protected export to the destination using an approved transfer method. From the destination's elevated PowerShell session:

New-Item -ItemType Directory C:\DHCP-Migration\PreImportBackup -Force
Import-DhcpServer -File C:\DHCP-Migration\dhcp-export.xml `
    -BackupPath C:\DHCP-Migration\PreImportBackup -Leases

The backup path supports preservation of the destination state before import. Do not add -ScopeOverwrite by habit. That switch can replace an existing destination scope, so use it only after confirming the destination and recovery plan. An import warning about a pre-existing scope needs a decision, not silent suppression.

Compare scope ranges, reservations, exclusions, options, policies and lease counts against the final source evidence. Check server-level settings too. Credentials used for DNS updates require explicit verification and secure reconfiguration where necessary; do not assume a migration file is a portable secret store.

Authorize and activate the intended service

In an AD domain, authorize the new server through an account with the required rights. An illustrative command is:

Add-DhcpServerInDC -DnsName dhcp-new.example.internal -IPAddress 192.0.2.20
Get-DhcpServerInDC

The address above is documentation-only. Verify the real destination address and avoid registering a stale temporary IP. Start the destination service and activate the intended scopes only after confirming the source cannot serve overlapping allocations. Update relay destinations and any network rules in the agreed sequence.

Review DHCP service events for authorization and startup errors. A role installed successfully can still refuse to serve because it is unauthorized, bound to the wrong interface or unreachable from relays. Inspect those facts before repeatedly deleting and recreating the scopes.

Test a lease from each network path

Use an approved test client on each representative subnet to obtain or renew a lease. Avoid releasing an administrator's only remote-access connection. Inspect the client configuration for DHCP server address, subnet mask, router, DNS servers, domain suffix and lease timing. Confirm the lease appears on the new server.

Test reservations and policy-dependent devices separately. A standard workstation receiving an address does not prove a phone, printer or specialized vendor class receives its intended options. Check DNS registration where the DHCP service performs updates, including ownership and update credentials.

If local-subnet requests work but remote-subnet requests fail, inspect relay/IP-helper settings, routing and filtering. If addresses arrive but applications fail, compare options rather than assuming the pool is corrupt. If duplicate addresses appear, stop and investigate possible overlapping service immediately.

Keep rollback consistent with new allocations

Before the new server issues leases, rollback can usually restore the original service and authorization after reversing network changes. After new leases have been issued, the old database may be stale. Re-enabling it blindly can allocate addresses already in use. Plan how the current lease state will be preserved or reconciled before returning service.

Retain the source powered off or with DHCP disabled until acceptance, then remove the old role and authorization through the retirement process. Save the final export, validation results, relay updates and backup schedule. Microsoft's export and import references describe the scope and lease switches; its migration guidance provides the broader recovery context.

Related procedures

How to Create DHCP Policies for Device Classes; How to Configure DNS Client Settings with PowerShell; How to Plan an In-Place Upgrade to Windows Server 2025.


Was this answer helpful?

« Back