Powershell – Backup Multiple DHCP Databases to SMB Share
Quick script to backup DHCP databases from various Windows 2008R2 site servers to a central file share.
# server site codes $siteCodes = @('PDX','NYC','LAX') # set backup path $backupRoot = "\\my-fps.contoso.com\some-share\backups\dhcp" # copy the DHCP backups over to MY-FPS ForEach ($x in $siteCodes) { $path = "\\$x-ad.contoso.com\c$\windows\system32\dhcp\backup" Copy-Item $path -Destination $backupRoot\$x -Recurse -Force -ErrorAction SilentlyContinue }