Thursday, September 3, 2009

Netsh.exe - DHCP backup and more

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

import c:\backup\dhcpdb all (all=>import full config)
import c:\temp\dhcpdb

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.

1 comment:

  1. I've tried to migrate a DHCP service from WS2003 to WS2008R2 and it doesn't restore the reservations. Is that normal??

    If I use the UI to make a backup and to resotre I get the same behaviour, the scope is restored but no the reservations.