Bill Strohm said:
I must create approximately 600 scopes on our new network. Is there any way
to create a text file and import it into DHCP? I've looked at the netsh
command but it won't let me specify ranges, etc. Is there some other MS or
third-party tool I've overlooked? Thanks!
Bill Strohm
Not to encourage off-topic postings, but I must defend the netsh command
shell. I haven't found anything it can't do yet. See the example below for
the creation of a DHCP scope, including ranges, options, reservations, et
al. Get a text file right with everything you want and import it on your
DHCP server with:
netsh -f DHCP_Config.txt
Dump your existing DHCP config with:
netsh dhcp server dump > path\DHCP_Dump_Config.txt
Dhcp Server 192.168.1.20 add scope 192.168.29.0 255.255.255.0 "VLAN_26"
"VLAN_26"
Dhcp Server 192.168.1.20 Scope 192.168.29.0 set state 1
# ======================================================================
# Start Add Ipranges to the Scope 192.168.29.0, Server 192.168.1.20
# ======================================================================
Dhcp Server 192.168.1.20 Scope 192.168.29.0 Add iprange 192.168.29.21
192.168.29.254
# ======================================================================
# End Add Ipranges to the Scope 192.168.29.0, Server 192.168.1.20
# ======================================================================
# ======================================================================
# Start Add Excluderanges to the Scope : 192.168.29.0, Server :
172.31.102.74
# ======================================================================
Dhcp Server 192.168.1.20 Scope 192.168.29.0 add excluderange 192.168.29.121
192.168.29.155
Dhcp Server 192.168.1.20 Scope 192.168.29.0 add excluderange 192.168.29.39
192.168.29.39
# ======================================================================
# End Add Excluderanges to the Scope : 192.168.29.0, Server :
172.31.102.74
# ======================================================================
# ======================================================================
# Start Add OptionValues to the Scope : 192.168.29.0, Server :
172.31.102.74
# ======================================================================
Dhcp Server 192.168.1.20 Scope 192.168.29.0 set optionvalue 3 IPADDRESS
"192.168.29.3"
Dhcp Server 192.168.1.20 Scope 192.168.29.0 set optionvalue 51 DWORD
"172800"
Dhcp Server 192.168.1.20 Scope 192.168.29.0 set optionvalue 6 IPADDRESS
"192.168.1.31" "192.168.1.30"
Dhcp Server 192.168.1.20 Scope 192.168.29.0 set optionvalue 44 IPADDRESS
"192.168.1.32" "192.168.1.33"
# ======================================================================
# End Add OptionValues to the Scope : 192.168.29.0, Server :
172.31.102.74
# ======================================================================
# ======================================================================
# Start Add ReservedIp to the Scope : 192.168.29.0, Server :
172.31.102.74
# ======================================================================
Dhcp Server 192.168.1.20 Scope 192.168.29.0 Add reservedip 192.168.29.121
0002557af6e7 "C03486." "" "DHCP"
Dhcp Server 192.168.1.20 Scope 192.168.29.0 Add reservedip 192.168.29.122
0002551433ef "C01190." "" "DHCP"
Dhcp Server 192.168.1.20 Scope 192.168.29.0 Add reservedip 192.168.29.123
0060b04daca6 "Res_192.168.29.123" "" "BOTH"
# ======================================================================
# End Add ReservedIp to the Scope : 192.168.29.0, Server :
172.31.102.74
# ======================================================================