I have created a Windows core server named TM_DHCP. The below image is showing the Server configuration. To open the server configuration use the “Sconfig” command in PowerShell. The server is already part of the test domain.
First, we will install DHCP using the windows admin Center. I have added that to Windows Admin Center for easy management.
Under Roles and Feature, select DHCP and click install.
It will remotely calculate the dependencies for the DHCP role on the server.
Once the checks complete, it will start installing the DHCP role on the server.
It will take a few minutes for the role to get installed.
To manage more using PowerShell, install the DHCP PowerShell tools.
Now we can configure the DHCP server using Windows Admin Center.
The second method is to install DHCP using PowerShell on Windows server 2019 core.
Open PowerShell as administrator and run the below command to install the DHCP role on the server.
Install-WindowsFeature DHCP -IncludeManagementTools
Once the DHCP install is complete, we will start the configuration.
First, we will create a DHCP security group using the netsh command.
netsh DHCP add securitygroups
Restart-Service dhcpserver
Authorize the DHCP server in Active Directory using “add-DhcpServerInDC” command.
Add-DhcpServerInDC -DnsName TM-DHCP.Domain.com -IPAddress 10.0.64.7
Use Get-DHcpServerInDc to verify the DHCP server authorized in Active Directory.
Get-DHcpServerInDc
To assign IP to the requesting system, we now have to create Scope. With the scope, we will also configure the DHCP options like DHCP Exclusion range, Default gateway, DNS server IP address, and DNS domain name.
Add-DhcpServerv4Scope -name "Internal" -StartRange 10.0.64.1 -EndRange 10.0.64.254 -SubnetMask 255.255.255.0 -State Active
Add-DhcpServerv4ExclusionRange -ScopeID 10.0.64.0 -StartRange 10.0.64.1 -EndRange 10.0.64.10
Set-DhcpServerv4OptionValue -OptionID 3 -Value 10.0.64.1 -ScopeID 10.0.64.0 -ComputerName TM-DHCP.Domain.com
Set-DhcpServerv4OptionValue -DnsDomain teammicro.dom -DnsServer 10.0.64.5
To test the new DHCP server, I used two different systems, Windows Core and Windows 10 for the IP assignment using the newly-created DHCP server.
Below is the Windows Admin Center view to check the configuration on the DHCP server.
Now the DHCP server is up and ready for use.
Conclusion
We have covered the Step by Step install and configuration process for the DHCP role on Windows server 2019 core.
Thank you for reading.