Created
October 12, 2015 11:03
-
-
Save gioxx/10f51beeaa3cd77b61b5 to your computer and use it in GitHub Desktop.
Batch: Replicate DHCP Reservations (from DHCP1 to DHCP2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netsh dhcp server dump | findstr reservedip > C:\temp\dhcp1.txt | |
FOR /F "tokens=1,2,3*" %%a in (C:\temp\listareservation1.txt) do @echo %%a %%b \\SERVERDHCP2 %%d >> C:\temp\dhcp2.txt | |
netsh -f C:\temp\dhcp2.txt | |
del C:\temp\dhcp1.txt C:\temp\dhcp2.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment