Create a csv file, each line contains :
10.20.220.0,10.20.221.238,00409D3C40FD,09-200-0277
10.20.220.0 = scope
10.20.221.238 = ip adress
00409D3C40FD = MAC adress
09-200.0277 = hostname
Then execute the following command that uses the file to make the reservations:
for /f “tokens=1-4 delims=,” %G IN (list.csv) do netsh dhcp server \\dhcp_servername scope %G add reservedip %H %I %J
Token-1-4 = select the 4 columns from above
List.csv = Bestand waar alle adressen in staan
Rest van de commando’s spreekt voor zich
Execute the following command as administrator:
for /f “tokens=1-4 delims=,” %G IN (list.csv) do netsh dhcp server \\dhcp_servername scope %G add reservedip %H %I %J
Leave a Reply