Jump to content

Microsoft DHCP Backup Script (Windows 2003)


ken82m
 Share

Recommended Posts

This script will backup the entire DHCP database and settings on a Windows 2003 Server computer to a text file.

This file can be restored to the same server or another one regardless of host name.

; This script is designed for Windows 2003 Server

RunWait(@ComSpec & ' /c "del C:\DHCPBackup\DHCPBack-*.txt /Q /F"', @SystemDir)
RunWait("netsh dhcp server export C:\dhcpbackup\DHCPBack-" & @MON & @MDAY & @YEAR & ".txt all", @SystemDir)
FileDelete("\\fileserver1\Workgroups\ITS\Operations\Reference Material\Network\DHCP Backup\DHCPBack-*.txt")
FileCopy("C:\dhcpbackup\DHCPBack-" & @MON & @MDAY & @YEAR & ".txt", "\\fileserver1\Workgroups\ITS\Operations\Reference Material\Network\DHCP Backup\*.*", 1)

;Restore Command
;netsh dhcp server export C:\dhcpbackup\DHCPBackupFile.txt all
Edited by ken82m

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

Thanks! Happy someone else can put it to you use :)

 "I believe that when we leave a place, part of it goes with us and part of us remains... Go anywhere, when it is quiet, and just listen.. After a while, you will hear the echoes of all our conversations, every thought and word we've exchanged.... Long after we are gone our voices will linger in these walls for as long as this place remains."

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...