Since Windows Server 2016 Insider Build is free with full licenses, why not using it? But it’s only available in Server Core, which means I will have to use PowerShell to do all the work. I am setting up one that is the first server in a test environment and I need it to be the AD server as well as DHCP. DNS will be added automatically during the AD installation.
Here are the basic steps to get started.
Get the server ready
- Setting up network settings with a static IP for the server;
- Assigning a meaningful NetBIOS name (ComputerName);
- Install all updates to keep the system up-to-date;
- Activate the Windows Server installation;
You can use either the PowerShell cmdlets such as New-NetIPAddress and Set-DNSClientServerAddress to make these changes or the Server Core built-in tool sconfig.exe if you would like something easier.
Install Active Directory service
Install-WindowsFeature -Name AD-Domain-Services
to install the Active Directory server role. No restart needed.
Install-ADDSForest -DomainName test.local
to install the first Forest with the name test.local. You will need to provide the safemodeadministratopassword and confirm the server to be configured and rebooted afterward along the way. Note that the DNS server will be installed and properly configured automatically during the process.
Once rebooted, use DCDiag to verify the new Domain Controller and make sure the AD and DNS services are running and sysvol and netlogon shares are properly configured.
Now let’s add a first user account using
New-ADUser -Name kent -AccountPassword(Read-Host -AsSecureString "AccountPassword") -PassThru | Enable-ADAccount
Type in the password twice and it’s all set. And then use
to add the newly created user to the group you would like, such as Administrators group.
Install DHCP service
Install-WindowsFeature -Name DHCP -IncludeManagementTools
And then use
Add-DHCPServerv4Scope -Name "Internal" -StartRange 192.168.30.51 -EndRange 192.168.30.100 -SubnetMasking 255.255.255.0 -State Active
to add a new DHCP scope and use
Set-DHCPServerv4OptionValue -ScopeID 192.168.30.0 -DnsDomain test.local -DnsServer AD-IP -Router IP-of-Router
to set up the DHCP options.
Final step, use
Add-DHCPServerInDC -DnsName test.local -IPAddress IP-of-DC
to authorize the DHCP server to operate in the specified domain.
To verify, use Get-DHCPServerInDC.
That’s about it, enough to get a working Domain powered environment.