Using the netsh command to migrate Windows DHCP server scopes and settings to a new server

Hi all,

I’m writing this blog to let you know about a quick and easy way to migrate your DHCP scopes from one Windows Server to another without having to recreate them. This article assumes you have 2 DHCP servers setup and¬†¬†authorization and deauthorization have been completed. The steps to migrate the scopes are outlined below.

Log in to the DHCP server which has the scopes configured with an account that has administrative privilages. Open a command prompt (as administrator if applicable) and type the following command replacing “c:\DHCP\myscopes.txt” with the path you would like to use to save the export:

netsh dhcp server export c:\DHCP\myscopes.txt all

The above command will export all the information to a text file named myscopes.txt in a folder call DHCP on the C drive.

Now you can copy the file you just exported over to a folder on the new DHCP server. In this example I will keep it simple and copy the file to a folder named DHCP on the C drive of the new server. Now type the following command to import the scopes into the new server.

netsh dhcp server import c:\DHCP\myscopes.txt all

NOTE: Importing and Exporting the txt file to a unc path is supported if you want to use a network share to avoid having to copy the file.

Now if you open the DHCP mmc on the new server you will see the scopes have been imported. I hope this helps. As always, if you have any questions or feedback, please leave a comment.

Share Button
Author: BC

BC is a Pipe2text.com contributor and has been an IT Professional for 15 years. He currently works as a Sr. Systems Engineer at a private firm. He enjoys working with Active Directory, Exchange and VMware among other technologies.


Leave a Reply

Your email address will not be published. Required fields are marked *