Friday, May 24, 2013

DHCP Scheduled Backup

1. Create a batch file for DHCP backup.  This file will keep the last 7 days of dhcp backups.

cd c:\
cd \Backup\dhcp
rmdir %Date:~0,3%
md %Date:~0,3%
cd %Date:~0,3%
netsh dhcp server export dhcpdb all

2. Create a scheduled job to run the batch file every day