
Written by
Migrating DHCP Servers
If you’ve ever had to migrate a DHCP server from one system to another you know how time consuming it can be to recreate a scope or numerous scopes, especially if you have reservations.
With the newer versions of Windows (2008 and up) there is a command line tool that can help you quickly recreate those scopes. From an administrative command prompt on a server run:
netsh dhcp server \\sourcedhcpserver scope “IP of the scope” dump>c:\dhcp.txt
An example would be as follows:
netsh dhcp server \\server1 scope 192.168.1.0 dump>c:\dhcp.txt
Now you have a text file with all of the attributes of your DHCP scope!
You can now edit this text file and change the name of the server to match the name of the new server. You can also make other changes to the scope. For instance, you can change the subnet of your scope by editing the subnet field in the text file. Since there is no way through the GUI to change the scope of an established DHCP scope, this can come in very handy under certain situations.
Once you have the text file with the necessary changes you need to upload the configuration to the new server. To do that you run the following commnad (from an administrative command prompt):
netsh exec c:\dhcp.txt
Now you should have your scope on the new server!