A Step-by-Step Guide to Configuring DHCP on Windows Server 2016 Using GUI and PowerShell.
S GUI
1. Běh a DHCP console from the apps list. Navigovat do IPv4\Server Options. There we config Server options for all scopes;
2. Pravé tlačítko myši klikněte na Server Options a klikněte Configure Options;
3. Select option 006 DNS Servers, vstoupit an IP address, a klikněte Přidat;
4. Select option 015 DNS Domain Name, enter the domain name, a klikněte OK;
5. New options added;
6. Pravé tlačítko myši klikněte na IPv4 a klikněte New Scope;
7. Klikněte další;
8. Vstupte název (and if you wish Popis), a klikněte další;
9. Vstupte the Start IP address, End IP address, a Subnet mask, a klikněte další;
10. On this page, you may exclude the IP range from DHCP. Klikněte další;
11. Soubor Lease Duration a klikněte další;
12. You may select Ano and configure Scope Options for this scope. vybírám si Ne, klikněte další;
13. Klikněte Dokončit;
14. Scope created, but we must Activate it;
15. Pravé tlačítko myši click at the scope and click Activate;
16. Scope activated and worked!
17. If you Pravé tlačítko myši klikněte na Leased IP Address, you may Add to the reservation Add to the filter, or even Vymazat it;
S PowerShell
1. Běh PowerShell jako správce. To get active scopes enter:
Get-DhcpServerv4Scope -cn <dhcp server name> | select scopeid, name, description
2. To add new scope, vstoupit:
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 Osvědčené postupy is run the command with WhatIf parametr:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name> -WhatIf
4. Then run without the WhatIf parametr:
Remove-DhcpServerv4Scope -ScopeId <scope id> -cn <dhcp server name>
5. Scope removed.