To explore Server 2019 further, we will try to run Active Directory services with Server 2019 Core edition. For the Installation of Server 2019 Core check out this link (select the version shown in the below figure).
I have recently started using Windows Server Core which not only saves space but also uses very low memory to run my domain controllers.
To install Active Directory, we need to set our Server as per the recommended configuration for AD.
- System Name
- Static IP
- Date and Time
This will make sure that everything is set as per the recommendation. Once your server is ready, open the command prompt and type start PowerShell
Then, you need to run the sconfig command. This gives you the system details.
Next, we need to change the system name. It will prompt you to restart the system.
The next step will be to set the static IP for the system.
By opening PowerShell, type the following commands.
Run
Get-NetAdapter
This will give the name of the adapter which we will use as the interface alias.
$ipaddress = “10.0.64.2”
$dnsaddress = “127.0.0.1”
New-NetIPAddress –InterfaceAlias Ethernet –IPAddress –AddressFamily IPv4 -PrefixLength 24
Update DNS
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses $dnsaddress
Once done, restart the server.
Now, let us set the time zone. For that, type the following commands in PowerShell.
Get-timezone
Set-TimeZone -Id "Eastern Standard Time"
Once everything is set, it will start installing AD Service.
We can do the installation in two ways here.
- Windows Admin Center (this will help you to install roles and features but to configure the same, we need to use PowerShell only).
- PowerShell command
Using Windows Admin Center
For Windows Admin Center, we need to set up and add a server (Follow Link).
Once the server is connected to Windows Admin Center, you need to connect the server.
Once the server is connected, you will find the overview of the system utilization page.
On the left side tools, you have to select Roles & features. Now you can select whichever role you need to install and click Install.
This will start checking dependencies
It will give you a list of the roles you are going to install.
You will find a notification window with a progress update there.
Using PowerShell
PowerShell Command to start creating Domain Controller
Get-WindowsFeature AD-Domain-Service | Install-WindowsFeature
Import-Module ADDSDeplyoment
Install-ADDSForest
This will ask you for the Domain Name and SafeMode password. Make sure you write this down in a safe place. It will be very useful in case of disaster recovery.
You can select Y or A as an answer to the question.
While installation is going on you will see some warning.
Once everything is done the server will reboot automatically.
Once a server is ready we will create a new Admin user which helps admin to do day to day work.
New-ADUser –Name “Helpdesk” – GivenName Help –Surname Desk –SamAccountName Helpdesk – UserPrincipalName [email protected]
To verify the user details:
Get-ADUser Helpdesk
You will find the user is not active yet. Before enabling the user, set the password for that user.
Command to set password:
Set-ADAccountPassword ‘CN=Helpdesk,CN=users,DC=Teammicro,DC=Dom’ -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “Test@123” -Force)
Enable the AD user
Enable-ADAccount -Identity Helpdesk
Add the user to Domain Admins group
Add-AdGroupMember ‘Domain Admins’ Helpdesk
Now it will configure over Active Directory and be ready for use.
We have covered installation of Active Directory on server 2019 core.
I hope this will help you and save you time when you create your own AD services.
Feel free to ask any questions.
Thank you for reading.