Jump to content



Photo

Microsoft DHCP Backup Script (Windows 2003)


  • Please log in to reply
2 replies to this topic

#1 ken82m

ken82m

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 623 posts

Posted 11 October 2007 - 10:27 PM

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, 11 October 2007 - 10:29 PM.

My ContributionsPC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs ScriptIT Help Desk and System Information ToolSet On Lid Close Power Option - Streaming Media Server & Website”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.”





#2 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 12 October 2007 - 07:01 AM

@ken82m

Good job might come in handy some time !!


regards

ptrex

#3 ken82m

ken82m

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 623 posts

Posted 13 October 2007 - 01:02 AM

Thanks! Happy someone else can put it to you use :)
My ContributionsPC Builders Console - Secure PDF Creator - Cisco VPN Installer MS DNS Server Backup Script - MS DHCP Backup Script IT Admin Console - Toggle Admin Mode - MyMovies-Add Discs ScriptIT Help Desk and System Information ToolSet On Lid Close Power Option - Streaming Media Server & Website”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.”




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users