Technet reference:

https://technet.microsoft.com/en-us/library/jj590751.aspx

Web links:

https://blogs.technet.microsoft.com/heyscriptingguy/2013/01/15/use-powershell-to-create-multiple-dhcp-scopes-on-dhcp-servers/

https://gallery.technet.microsoft.com/Create-a-DHCP-Scope-based-3a219b3c

Example:

Remove-DhcpServerv4Scope -ScopeId 10.65.11.0 -Force

Add-DhcpServerv4Scope -Name “SERVICE-LAN-VIRTUAL” -Description “Virtual Wks Office VLAN” -StartRange 10.65.11.66 -EndRange 10.65.11.126 -SubnetMask 255.255.255.0 -LeaseDuration 7.0:0:0 -State Active -Type Dhcp
Set-DhcpServerv4OptionValue -ScopeId 10.65.11.0 -OptionId 3 -Value 10.65.11.1
Set-DhcpServerv4OptionValue -ScopeId 10.65.11.0 -OptionId 6 -Value 10.65.11.6 -Force
Set-DhcpServerv4OptionValue -ScopeId 10.65.11.0 -OptionId 44 -Value 10.65.11.7 -Force
Set-DhcpServerv4OptionValue -ScopeId 10.65.11.0 -OptionId 46 -Value “0x8” -Force

Add-DhcpServerv4Failover -ScopeId 10.65.11.0 -PartnerServer 10.65.12.12 -Name TVLAN-$3rdOctet
Get-DhcpServerv4Failover -ScopeId 10.65.11.0

Advertisements