Ref: AI Tools, ChatGPT : As is
To install the DHCP Server role on Windows Server 2019, use Windows PowerShell as Administrator on the server VM, not the client VM.
1. Open PowerShell as Administrator
On the Windows Server VM:
Start Menu → Windows PowerShell → Right-click → Run as administrator
2. Check whether DHCP is already installed
Get-WindowsFeature DHCP
If it is not installed, you may see:
Display Name Install State
------------ -------------
[ ] DHCP Server Available
3. Install DHCP Server role
Install-WindowsFeature DHCP -IncludeManagementTools
-IncludeManagementTools installs the DHCP management tools also.
4. Verify installation
Get-WindowsFeature DHCP
Expected result:
[X] DHCP Server Installed
Also check the DHCP service:
Get-Service DHCPServer
5. Start or restart the DHCP service
Start-Service DHCPServer
or:
Restart-Service DHCPServer
Verify again:
Get-Service DHCPServer
Expected status:
Status Name DisplayName
------ ---- -----------
Running DHCPServer DHCP Server
6. If the DHCP server is domain-joined, authorize it in AD
Use the server’s static IP address:
$ServerIP = "192.168.XX.10"
$ServerFQDN = "$env:COMPUTERNAME.powershell.local"
Add-DhcpServerInDC -DnsName $ServerFQDN -IPAddress $ServerIP
Get-DhcpServerInDC
Replace XX with the student’s network number.
Simple version
Install-WindowsFeature DHCP -IncludeManagementTools
Get-WindowsFeature DHCP
Get-Service DHCPServer
This installs and verifies the DHCP Server role.
