Installing and authorizing a DHCP server is easy and straightforward. You can use the GUI, Server Manager to achieve this. Server Manager, though, is a GUI layered on top of PowerShell. The GUI gathers the details, and PowerShell does the rest. In this recipe, you carry out the installation and basic configuration using just the native cmdlets.
- Login to
DC1
, and add the DHCP server feature to your system:
Install-WindowsFeature -Name DHCP ` -IncludeManagementTools
- Add the DHCP server's security groups:
Add-DHCPServerSecurityGroup -Verbose
- Let DHCP know it's all configured:
Set-ItemProperty ` -Path HKLM:\SOFTWARE\Microsoft\ServerManager\Roles\12 ` -Name ConfigurationState ` -Value 2
- Authorize the DHCP server in Active Directory:
Add-DhcpServerInDC -DnsName DC1.Reskit.Org
- Restart DHCP:
Restart-Service -Name DHCPServer...