A Step-by-Step Guide to Configuring DHCP on Windows Server 2016 Using GUI şi PowerShell.
With GUI
1. Fugi cel DHCP console from the apps list. Navigate to IPv4\Server Options. There we config Server options for all scopes;
2. Butonul din dreapta al mouse-ului click at Server Options și faceți clic Configure Options;
3. Select option 006 DNS Servers, enter an IP address, și faceți clic Add;
4. Select option 015 DNS Domain Nume, enter the domain name, și faceți clic Bine;
5. New options added;
6. Butonul din dreapta al mouse-ului click at IPv4 și faceți clic New Scope;
7. Click Next;
8. Intră Nume (and if you wish Description), și faceți clic Next;
9. Intră the Start IP address, End IP address, şi Subnet mask, și faceți clic Next;
10. On this page, you may exclude the IP range from DHCP. Click Next;
11. Set Lease Duration și faceți clic Next;
12. You may select Da and configure Scope Options for this scope. I choose Nu, clic Next;
13. Click Finish;
14. Scope created, but we must Activate it;
15. Butonul din dreapta al mouse-ului click at the scope and click Activate;
16. Scope activated and worked!
17. If you Butonul din dreapta al mouse-ului faceți clic pe Leased IP Address, you may Add to the reservation Add to the filter, or even Delete it;
With PowerShell
1. Fugi PowerShell as Administrator. To get active scopes enter:
Get-DhcpServerv4Scope -cn <dhcp server name> | select scopeid, name, description
PowerShell2. To add new scope, enter:
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.