Configuring Windows Server 2016 Technical Preview 3 with PowerShell

Posted: October 20, 2015 in Windows Server

In this blog we’ll set date and time,IP address,hostname (dc) on Windows Server 2016,install AD,DNS and DHCP roles,

and finally add windows 10 client to the domain,all of this will be done using PowerShell commands.

 rename-computer dc -restart

To set date and time:

 Set-Date -date "10/20/2015 22:23"





Setting TCP/IP properties (IP,Network mask,default gateway and DNS server)

get-netadapter | new-netipaddress -ipaddress -prefixlength 24 -defaultgateway"
get-netadapter | new-netipaddress -ipaddress -prefixlength 24 -defaultgateway"
get-netadapter | Set-DNSClientServerAddres -interfacealias "ethernet" -ServerAddresses

In above examples,we set servers ip address to,gateway to and pointed preferred DNS toserver itself (

Installing AD ( and promoting server to domain controller (installing DNS role in process)

Install-ADDSForest -creatednsdelegation:$false -databasepath "c:\windows:\ntds” -domainmode "win2012r2" -domainname "" -domainnetbiosname "TEST" -forestmode "winr2012r2" -installdns:$false -logpath "c:\windows\ntds" -norebootoncompletion:$false -syswolpath "c:\windows\sysvol" -force:$true

Take a look at DNS zone file:

get-dnsserverresourcerecord -zonename ""



Installing and configuring DHCP on domain controller (DC)

install-windows-feature dhcp

Configure DHCP to listen on it’s ethernet interface

get-netadapter | Set-DhcpServerv4Binding -BindingState $true

Authorize DHCP in AD. An unauthorized DHCP server on a network can disrupt network operations by allocating incorrect addresses or configuration options.

Add-DhcpServerInDC -DnsName -IPAddress

Create and activate DHCP scope which will lease addresses in range

add-dhcpserverv4scope -startrange -endrange -subnemask -name "test scope" -state active

Set default gateway and DNS  for DHCP scope

Set-DhcpServerv4OptionValue -ScopeId -Router
Set-DhcpServerv4OptionValue -DnsServer -DnsDomain

Get scope properties:

Get-DhcpServerv4Scope –ComputerName dc | FL *


See leased addresses:

get-dhcpserverv4lease -scopeid


Create OU for win10 client:

New-ADOrganizationalUnit -name "workstations" -path "DC=test,dc=com"

Join win10 client to AD (type this from client computer)

add-computer -domain oupath "ou=workstations,dc=test,dc=com"

Review AD computers:

get-adcomputer -filter * | ft






Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s