How to create a DHCP scope in windows server 2016

How to create a DHCP scope in windows server 2016

 

In this blog post, I’ll show you How to create a DHCP scope in windows server 2016 using PowerShell 5.0.

The new Windows DHCP Server 2016 PowerShell Module offers all the functionally of the DHCP Console In one PowerShell Module so there Is no need to use the console to manage the Server.

Below you can see the DHCP Server console that nothing really changes with It since the release of Windows Server 2008.

Because of the maturity of the technology and the product using PowerShell to automate the deployment can save time and resources.

We could also use the PowerShell Module to back up the DHCP Server using a simple cmdlet which I’ll show next week.

How to create a DHCP scope in windows server 2016
How to create a DHCP scope in windows server 2016

The DHCP PowerShell module Is Installed automatically when you Install the DHCP Console or role on your Server.

To view, all the cmdlets run the line below.

Get-Command -Module DHCPServer

The module offers 121 cmdlets for both IPv4 and IPv6 tasks.

How to create a DHCP scope in windows server 2016
How to create a DHCP scope in windows server 2016

To create a DHCP IPv4 Scope with a range of 192.168.0.10 – 254 I will use the cmdlet below:

Add-DhcpServerv4Scope -Name "IT Network" -StartRange 192.168.10.1 -EndRange 192.168.10.254 -SubnetMask 255.255.255.0

To view the new scope I run the cmdlet

get-DhcpServerv4Scope

To active the scope, I use the line below

set-DhcpServerv4Scope -ScopeId 192.168.200.0 -ActivatePolicies $true




Search blogs




Bitnami