Lab Tasks
1. View DHCP Scopes
List all configured DHCP scopes on the server.
Get-DhcpServerv4Scope
2. Create New Scope
Create a new DHCP scope using PowerShell.
Add-DhcpServerv4Scope -Name "YourName" -StartRange X.X.X.X -EndRange X.X.X.X -SubnetMask 255.255.255.0
3. Add Reservation
Create a DHCP reservation for a device.
Add-DhcpServerv4Reservation -ScopeId X.X.X.0 -IPAddress X.X.X.X -ClientId XX-XX-XX-XX-XX-XX -Name "DeviceName"
4. View Active Leases
Query active DHCP leases in a scope.
Get-DhcpServerv4Lease -ScopeId X.X.X.0
5. Configure Options
Set DHCP scope options for DNS and gateway.
Set-DhcpServerv4OptionValue -ScopeId X.X.X.0 -Router X.X.X.1 -DnsServer X.X.X.10
Scope Discovery:
Use
Use
Get-Command *Dhcp* to discover available DHCP cmdlets and explore their functionality.
Tip: Use
Get-Help <cmdlet> to learn about any command. Try Get-Help Get-DhcpServerv4Scope -Examples!