I recently installed a new server in a clients office and upgraded it to a domain controller as part of decommissioning an older server. The old server was running the DHCP server for the office. This article will list the steps used to move DHCP to the new server.

There are several ways to accomplish this task. Depending on how simple or complex your DHCP set up is, this procedure may work for you. As always please backup the server data and any other configurations in case there are issues. It is also work noting that in my case both DHCP servers were running Windows DHCP server service.

If you only have a few devices with a DHCP lease it may be sufficient to disable DHCP on the old server. Then simply enable it on the new one and recreate your settings. If this is planned correctly you can set up your new scope with IP addresses not in the original scope. This will prevent any chance of an IP Conflict if devices hold on to IP address for longer lease times. In this article we have a slightly more complex DHCP setup for a small office with many devices with current IP leases.

On the existing DHCP server

Logon to the current DHCP server and open a command prompt as the administrator. I found it easiest to change the directory to the root of the C drive to run the command and create the files as noted below. Run the following command:

netsh dhcp server export dhcp.txt all

Then press enter. This will take a short time and will create a file called dhcp.txt in the current directory of your command prompt. Copy this file to the new DHCP server. At this point you can now stop the DHCP services on this server using the Services admin tool.

On the new DHCP server

Confirm that the DHCP service is installed and started on the new DHCP server and that there are no settings entered. They will get replaced with the settings from the old server. Open a command prompt as administrator on this new server and run the below command.

netsh dhcp server import dhcp.txt all

You may need to supply the full patch to the dhcp.txt file if you did not place it in the current folder location of your command prompt.

You will now need to Authorize this new DHCP server. Open the DHCP console on the new server. And in the console tree select right click the server name and choose “Authorize’. (note in the screen shot below I have already Authorized it)

Authorize DHCP server
Authorize DHCP Server

Once this server is authorized. You should see green checks next to the IPv4 and IPv6 (if used) items in the MMC console.

DHCP running
DHCP is running

If all went as planned the new server should have all of the scope and server settings as the old server as well as the current lease table and exclusions if any.

As stated above there are several ways to move DHCP to a new server but the above steps Fixed IT for me. Please leave comments or questions below.