Quickly back up your Windows Server DHCP configuration
Something I used in a project recently (but I must tip my hat to a colleague who introduced me to it) is using net shell to back up your Windows Server DHCP configuration in to a readable format to allow you to selectively restore sections lost or even to assist in migrating settings between servers.
On your DHCP server, type the following at an Administrative command prompt:
netsh dhcp server dump > C:\dhcpconfig.txt
This command will output a net shell command file to allow you to restore your configuration at a later date. If you have many DHCP reservations that you must migrate to another server, this is an ideal way of dumping the configuration. You can then edit the file and execute the commands using net shell to re-create the DHCP reservations on the new server.
NB: The configuration file will have references to the original DHCP server’s IP address so take care to edit these references before executing the file.
Once you have your file, or you’re simply restoring or testing, execute the following command to re-create the DHCP configuration on the server.
netsh exec c:\dhcpconfig.txt