A Step-by-Step Guide to Configuring DHCP on Windows Server 2016 Using GUI and PowerShell.
With GUI
1. Бягай на DHCP console from the apps list. Навигирайте до IPv4\Server Options. There we config Server options for all scopes;
2. Десен бутон на мишката click at Server Options и щракнете Configure Options;
3. Select option 006 DNS Servers, влизам an IP address, и щракнете Добавете;
4. Select option 015 DNS Domain Name, enter the domain name, и щракнете Добре;
5. New options added;
6. Десен бутон на мишката click at IPv4 и щракнете New Scope;
7. Кликнете Следващия;
8. Въведете Име (and if you wish Описание), и щракнете Следващия;
9. Въведете the Start IP address, End IP address, и Subnet mask, и щракнете Следващия;
10. On this page, you may exclude the IP range from DHCP. Кликнете Следващия;
11. Комплект Lease Duration и щракнете Следващия;
12. You may select да and configure Scope Options for this scope. I choose No, щракнете Следващия;
13. Кликнете завършек;
14. Scope created, but we must Activate it;
15. Десен бутон на мишката click at the scope and click Activate;
16. Scope activated and worked!
17. If you Десен бутон на мишката кликнете върху Leased IP Address, you may Add to the reservation Add to the filter, or even Изтрий it;
With PowerShell
1. Бягай PowerShell като Администратор. To get active scopes enter:
Get-DhcpServerv4Scope -cn <dhcp server name> | select scopeid, name, description
2. To add new scope, влизам:
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 Най-добри практики 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.