Skip to content

Instantly share code, notes, and snippets.

@andrewbbrown
Created May 16, 2018 16:28
Show Gist options
  • Save andrewbbrown/1a3fb47f5d871347b6e4e2fcb2945e4e to your computer and use it in GitHub Desktop.
Save andrewbbrown/1a3fb47f5d871347b6e4e2fcb2945e4e to your computer and use it in GitHub Desktop.
Get-WindowsFeature DHCP | Install-WindowsFeature -IncludeAllSubFeature -IncludeManagementTools
# Create an IPv4 DHCP Server Scope
Add-DhcpServerv4Scope -Name "Management-Internal-NADC-HL2" -StartRange 192.168.68.101 -EndRange 192.168.68.149 -SubnetMask 255.255.255.0 # -LeaseDuration = 00.00:30:30 -State Active
# Set the Router Option value
Set-DhcpServerv4OptionValue -ScopeId 192.168.68.0 -DnsServer 192.168.68.10 -DnsDomain vlab.local -Router 192.168.68.254
### Create DHCP Option definition 150 for TFTP
##Add-DhcpServerv4OptionDefinition -OptionId 150 -Type IPv4Address -Name "TFTP-Server"
###Set the DHCP Option Value for Option 150
##Set-DhcpServerv4OptionValue -ScopeId "10.67.36.0" -OptionId 150 -Value 10.67.36.25
##Adding a DHCP Server Reservation via MAC ID address (ClientId)
#Add-DhcpServerv4Reservation -ComputerName someservername -ScopeId 10.67.36.0 -ClientId 30054405308 -Name DescribingName -IPAddress 10.67.36.35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment