Sunday, November 22, 2020

Creating an AD Forest and DC on Server Core

INITIAL SERVER CONFIGURATION

When you've installed server core on your server, you will need to enter the command  sconfig into the command prompt to configure the server. Here you can configure the network settings, server name, install updates and other settings. I have set a static IP for my DC and named the server JAKENET-DC.


CREATING THE ACTIVE DIRECTORY FOREST

We can create the AD Forest using the commands below in PowerShell. Type PowerShell to enter PowerShell within the prompt.
Get-WindowsFeature AD-Domain-Services | Install-WindowsFeature
Import-Module ADDSDeployment
Install-ADDSForest
Set your domain name, set a password and then let the forest creation process run. Once it's finished, your server will now be part of the domain you created as a domain controller.


CREATING A USER

Once the DC has been setup, we can then create a user in PowerShell. Below is the commands you can use to create said user.
New-ADUser -Name “Jake” -GivenName "Jake" -Surname "Admin" -SamAccountName "Jake" -UserPrincipalName "Jake@Jakenet.com"
# Set Account Password
Set-ADAccountPassword ‘CN=Jake,CN=users,DC=Jakenet,DC=local’ -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “password” -Force)
# Enable the User
Enable-ADAccount -Identity Jake
# Add to Domain Admins Group
Add-ADGroupMember ‘Domain Admins’ Jake

No comments:

Post a Comment