Here’s how to transfer all of your DCHP Scopes, IP Leases, Reservations from one Windows Server to another. I’ve tested this on an old Windows Server 2012r2 to windows Server 2019 but this should work fine in Windows Server 2022 and from slightly older Windows Server OS’ like 2008, 2008r2, SBS2011 and 2012.
- Log in with an administrator account to the Old Windows Server.
- Open Powershell (as an administrator) and then type in the following command:
Export-DhcpServer -File C:\DHCPdata.xml -Leases -Force -ComputerName old.network.local –Verbose
(remembering to change the computer and domain information)
- De-authorise the old DHCP Server
- Copy the file C:\DHCPdata.xml the New Server.
- Log in with an administrator account to the New Windows Server
- Install and configure the DHCP role
- Start the DHCP service.
- Type in the following command on Powershell (as an administrator) to import the DHCP Data on the new server:
Import-DhcpServer -File C:\DHCPdata.xml -BackupPath C:\DHCP\ -Leases -ScopeOverwrite -Force -ComputerName new.network.local –Verbose
(remembering to change the computer and domain information)
- Restart the DHCP service.
- Authorise the new DHCP Server
- Verify your DHCP scope, IP leases, reservations etc and they should match with the old DHCP Server
- Check to make sure your client machines can get an IP address for your new DHCP Server on your network