Monday, April 29, 2024
HomePowershellConfigure DHCP-Server-Function with PowerShell – SID-500.COM

Configure DHCP-Server-Function with PowerShell – SID-500.COM


PowerShell

The Dynamic Host Management Protocol (DHCP) helps you handle your community by mechanically assigning IP-Adresses to hosts. On this article I’ll present you find out how to configure a DHCP Server with a Home windows Server working system. Let’s dive in.

Set up Server-Function

First, we have to set up the DHCP Server-Function together with its administration instruments.

Set up-WindowsFeature DHCP -IncludeManagementTools

As soon as full, we are able to uncover all DHCP PowerShell cmdlets by working Get-Command with the suitable module.

Get-Command -Module DHCPServer

Outline Scope and Scope Choices

Now we’re able to create a scope with a begin and finish vary.

Add-DhcpServerv4Scope -Identify pagr `
-StartRange 192.168.99.200 `
-EndRange 192.168.99.250 `
-SubnetMask 255.255.255.0

Subsequent, we outline the DNS settings, DNS-Server and the Gateway for the newly created scope.

Set-DhcpServerv4OptionValue `
-DnsDomain pagr.inet `
-DnsServer 192.168.99.10 `
-Router 192.168.0.1

Authorization

Home windows Server working methods which wish to act as a DHCP Server should be approved by an enterprise adminstrator of the area. In any other case, the server is not going to begin the DHCP service on the native laptop.

Reservation

You might wish to add a reserveration for a selected host.

Add-DhcpServerv4Reservation `
-ScopeId 192.168.99.200 `
-IPAddress 192.168.99.250 `
-ClientId "F9-FF-F1-7B-01-6E" `
-Description "Beamer"

Hope this was useful.

For extra data, check with the DHCP Server module.

Printed by Patrick Gruenauer

Microsoft MVP on PowerShell [2018-2023], IT-Coach, IT-Marketing consultant, MCSE: Cloud Platform and Infrastructure, Cisco Licensed Academy Teacher.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments