Backup all DHCP servers in Active Directory with PowerShell

Howdy guys,

Today I wanted to go through the PowerShell script I use to backup all the DHCP servers in our Windows domain. The script is a few years old now and I have a feeling there is probably a better way to do it, so look out for an updated script in the future over on my GitHub page. For the moment however this is the one I use.

A few things about this script:

  • It uses the cmdlet Write-Zip which is part of the PowerShell community extensions.
  • You need to configure the $LocalBackup and $BackupServer variables.
  • The script will check to see if each server has already been backed up on the day it is run and will skip the server if it has.
  • A local backup is done on the DHCP server before being copied to the backup server.
  • If you don’t have the DHCP cmdlets available you might need to install the Remote Server Administration Tools for your operating system.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s