A Step-by-Step Guide to Configuring DHCP on Windows Server 2016 Using GUI і PowerShell.
With GUI
1. бігти з DHCP console from the apps list. Перейдіть до IPv4\Server Options. There we config Server options for all scopes;
2. Права кнопка миші натиснути Server Options і натисніть Configure Options;
3. Select option 006 DNS Сервери, введіть an IP address, і натисніть додати;
4. Select option 015 DNS Домен Ім'я, enter the домен назва, і натисніть добре;
5. New options added;
6. Права кнопка миші натиснути IPv4 і натисніть New Scope;
7. Натисніть Далі;
8. Увійти Ім'я (and if you wish Description), і натисніть Далі;
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 Yes and configure Scope Options for this scope. I choose No, натисніть Далі;
13. Натисніть Finish;
14. Scope created, but we must Activate it;
15. Права кнопка миші click at the scope and click Activate;
16. Scope activated and worked!
17. If you Права кнопка миші click on Leased IP Address, you may Add to the reservation Add to the filter, or even Delete it;
With PowerShell
1. бігти PowerShell as Administrator. To get active scopes enter:
Get-DhcpServerv4Scope -cn <dhcp server name> | select scopeid, name, description
PowerShell2. 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>
PowerShell3. Before scope delete Best Practices is run the command with WhatIf parameter:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name> -WhatIf
PowerShell4. Then run without the WhatIf parameter:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name>
PowerShell5. Scope removed.