A Step-by-Step Guide to Configuring DHCP on Windows Server 2016 Using GUI and PowerShell.
Su GUI
1. Run the DHCP console from the apps list. Navigate to IPv4\Server Options. There we config Server options for all scopes;
2. Dešinysis pelės mygtukas spustelėkite adresu Server Options ir spustelėkite Configure Options;
3. Select option 006 DNS Servers, įveskite an IP address, ir spustelėkite Papildyti;
4. Select option 015 DNS Domain Name, enter the domain name, ir spustelėkite Gerai;
5. New options added;
6. Dešinysis pelės mygtukas spustelėkite adresu IPv4 ir spustelėkite New Scope;
7. Spustelėkite Kitas;
8. Enter vardas (and if you wish Description), ir spustelėkite Kitas;
9. Enter the Start IP address, End IP address, ir Subnet mask, ir spustelėkite Kitas;
10. On this page, you may exclude the IP range from DHCP. Spustelėkite Kitas;
11. Nustatyti Lease Duration ir spustelėkite Kitas;
12. You may select Yes and configure Scope Options for this scope. I choose No, spustelėkite Kitas;
13. Spustelėkite Baigti;
14. Scope created, but we must Activate it;
15. Dešinysis pelės mygtukas click at the scope and click Activate;
16. Scope activated and worked!
17. If you Dešinysis pelės mygtukas click on Leased IP Address, you may Add to the reservation Add to the filter, or even Delete it;
With PowerShell
1. Run PowerShell as Administrator. To get active scopes enter:
Get-DhcpServerv4Scope -cn <dhcp server name> | select scopeid, name, description
2. To add new scope, įveskite:
Add-DhcpServerv4Scope -Name ‘<scope name>’ -StartRange <start IP Address> -EndRange <end IP Address> -SubnetMask <subnet mask> -Description ‘<description>’ –cn <dhcp server name>
3. Before scope delete Best Practices is run the command with WhatIf parameter:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name> -WhatIf
4. Then run without the WhatIf parameter:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name>
5. Scope removed.