ServerCore Tutorial: How to make a Domain Controller (Full Commands)


This commands work 100% for all Server Core version of the Windows Server Operating Systems. Am going to show you the initial configuration code to build you Domain Controller in Server Core.

Step 1 - Change Computer Name
netdom renamecomputer %computername% /newname: <computer name>
and hit Enter
Note: You need to restart your computer. Type --> shutdown -r -t 00 /f and hit Enter

Step 2 - Insert IP Address
Before you insert you IP Address, you need to know the network card interface name. Type the command below to see it.
netsh interface IPv4 show interfaces

Now lets give it a IP Address
netsh interface IPv4 set address name=<interface name> source=static address=192.168.0.1 mask=255.255.255.0 gateway=
Note: You can put the gateway's IP Address there or leave it blank if you don't have.


Now that's it, if you need to make it a stand alone computer. If you need to make it a Domain Controller continue below;


Step 3 - Make Server Core A Domain Controller

Making a Domain Controller in Server Core, we would use an Unattended Installation. In this case, we would create a unattended installation file with the content below in a notepad document and save it inside our C:\ drive with the .txt format and name it. for example ---> dctest.txt

Note: You can change the domain name i used to your preferred domain name.

[DCINSTALL]
ReplicaOrNewDomain=Domain
NewDomain=Forest
NewDomainDNSName=vincenttechblog.lab
ForestLevel=3
DomainNetbiosName=vincenttechblog
DomainLevel=3
InstallDNS=Yes
ConfirmGc=Yes
DNSDelegation=NO
DatabasePath=C:\Windows\NTDS
LogPath=C:\Windows\NTDS
SYSVOLPath=C:\Windows\SYSVOL
SafeModeAdminPassword=password@1
TransferIMRoleIfNecessary=NO


Now that's the command that your unattended file should contain.
After saving it in the C:\ drive type the command below.

Step 4 - Run the dcpromo.exe Command
dcpromo.exe /answer:c:\test.txt
and hit Enter.
Note: test.txt is the Unattended file we created in step 3 and saved in the C:\ drive.

If you get a Delegation error, just go to your unattended file and clear the DNSDelegation=NO command, save and run again


Step 5 - Insert DNS IP Address

Since we made a Domain Controller we need to give and IP Address to our DNS that would be installed.

netsh interface IPv4 add dnsserver name=<interface name> address=192.168.0.1 index=1
and hit Enter
check the step 2 to see how you get your interface name and index=1 positions the DNS server as primary DNS server, while index=2 positions the DNS server as an alternate DNS server.



Step 6 - Join Computer To A Domain

In case of a stand alone computer where you need to join to the domain after configuration. Use the following commands below with a administrative credentials

netdom join <ComputerName> /domain:<DomainName> /userd:<UserName> /passwordd:∗∗∗∗∗∗

Where;
<ComputerName> represents the hostname of the computer you are joining to the Domain,  <DomainName> is the name of the domain to join e.g. contoso.com, and  <UserName> is a user account that has permission to join the domain. e.g CONTOSO\Administrator and password for the account. e.g password@1

Now thats what i have for now. If this helped you, please comment below and share.



Comments

Post a Comment

Popular posts from this blog

Here's the Facebook Hacking Tool that Can Really Hack Accounts.

Hyatt Hotel Says Payment Systems Hacked with Credit-Card Stealing Malware