Configuring DHCP server by PowerShell

Posted: January 10, 2017 in Windows Server

Install DHCP role:

Install-WindowsFeature DHCP -IncludeManagementTools


Create and activate DHCP scope which will lease addresses from

Add-DhcpServerv4Scope -name 'corpnet' -StartRange -EndRange -SubnetMask -State Active


Create DHCP exclusion for range

Add-DhcpServerv4ExclusionRange -ScopeId -StartRange -EndRange


Set Scope options (DNS server,domain name and Default Gateway

Set-DhcpServerv4OptionValue -DnsDomain -DnsServer -Router


Authorize DHCP server in AD (allow it to lease address)

Add-DhcpServerInDC -DnsName


Create DHCP reservation

Add-DhcpServerv4Reservation -ComputerName -ScopeId -IPAddrs -ClientId "F0-DE-F1-7A-00-5E" -Description "Reservation for test client"

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s