Early this morning I had a problem on one of my DHCP servers. One scope got messy and I wanted to get it fixed fast enough so ealy birds coming in will not notice the problem.
Lucky me i had a recent backup of my DHCP so all I had to do was restoring it to the server.
Netsh.exe utility is a functional tool that can be used for many tasks around your domain. my particular task here was importing the backup file I created as part of my DR plan.
Running the tool on the actual DHCP server those are the required commands:
dhcp server \\servername
export c:\backup\dhcpdb all (all=>backup ALL scopes)
export c:\temp\dhcpdb 192.168.20.0
import c:\backup\dhcpdb all (all=>import full config)
import c:\temp\dhcpdb 192.168.20.0
This is a very simple procedure that can save you time when DHCP fail.
You can use this tool for many more tasks, monitoring your system from command line.