![](https://cdn.ittsystems.com/wp-content/uploads/Active-Directory-Setup-Guide-528x396.jpeg)
Active Directory is a widely used Microsoft product that operates on windows server, it’s a database and set of services developed to help your organization with access, management and permissions for your network. The organizational data within AD can be in the form of devices, files, users, applications, groups and shared folders. In my 5 years within a support role, I’ve always used Active Directory and it has been essential to my work. So within this Guide Im going to walk you through setting it up within Windows Server 2019.
The first step was to create a windows server virtual machine on virtual box.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-17-at-12.03.34-PM-1024x584.png)
Once added I loaded the iso file for Windows Server 2019 and went through installation.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.05.23-PM-1024x696.png)
Once installation was complete, it was time to setup Networks. I navigated to network connections to determine which network adapter would be used for External and Internal.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.37.41-PM-1024x395.png)
Once in the network details It was easy to locate the network that would be used for internal as it had the IP of 169.254.xxx.xxx and we know that an address with 169.254 the DHCP is not reachable and the 169. address was automatically assigned to it.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.40.50-PM.png)
Once I properly identified the networks and renamed them to reflect Internal and Internet. I changed the properties for IPV4 internal network to use a static IP address. The domain controller is going to serve as the default gateway so that the IP address is not set. Once we install Active Directory it automatically installs DNS so this server can use itself as DNS. So what I did was enter the loopback address.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.47.32-PM-946x1024.png)
With network adapter properties set I renamed the server to DC (domain controller) and the restarted it.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.50.07-PM-1024x509.png)
Once back in, it’s time to install the Active Directory domain services. I opened server manager and went to ‘Add roles and features’.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.58.32-PM-1024x391.png)
Select the correct server and then I chose ‘Active Directory Domain Services’ in the server roles section and continued through to installation.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-15-at-11.59.51-PM.png)
Once installed and back in the Server Manager dashboard I did the post deployment configuration, this can be found in the notifications section (flag icon), this is where the domain is actually created.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.03.38-AM.png)
In deployment configuration screen, I chose ‘add a new forest’ and then gave it a new root domain name. I went through the remaining options with default settings and selected install and let it finish and reboot the server.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.04.43-AM.png)
After the restart, I created a dedicated domain admin account. I did this by going to ‘Active Directory Users and Computers’ from the start menu. Once open, under the newly created domain I opened a new organizational unit.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.19.00-AM.png)
In organizational Unit, create a new user.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.21.30-AM.png)
After created my user, I went to properties and under ‘Member of’ tab I added ‘Domain Admins’ which gave me my own domain admin account.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.24.02-AM.png)
Next I signed out and back in with my admin account.
After logging back in the next step was to install a remote access server to allow clients on the internal network still be able to access the internet. In Server manager go back to “add roles and features. In the ‘Server Roles’ section I selected ‘Remote access’ and installed the ‘Routing’ option.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-17-at-1.46.50-PM.png)
Once thats completed I went back into ‘Server manager’ under tools I chose ‘Routing and Remote access’. From here I went to ‘Configure and enable routing and remote access’ for the domain controller and installed ‘Network address translation’ (NAT) which will allow all clients on the network to reach out the outside internet sharing one public IP address.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.35.04-AM-1024x781.png)
Choose the correct network adapter and finish the installation.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.34.55-AM.png)
Once installed and back in the server manager dashboard, I went back to ‘Roles and features’ and chose ‘DHCP Server’ under ‘Server Roles’ and installed it.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.37.25-AM.png)
Under the Domain I went to the IPV4 section and created a ‘New Scope’ and set up the range of IP ‘s to be used and the subnet mask. I didn’t need to exclude any IP’s and left the lease duration as default, since this is my own custom network.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.41.58-AM.png)
After this was the next step is to configure the DHCP options which allowed me to setup the Router(Default Gateway). This is what enables clients to access the internet.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.44.47-AM.png)
So for this to look like a network with multiple users. We need many accounts, for this I found a powershell script that automates this process. Within Powershell ISE loaded the script that created hundreds of random user accounts.
This script creates new organizational units for users and adds the hundreds of names from the text file. it creates them all with the same password for convenience and uses a loop to extract each name from the text file to setup new accounts for each one.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.52.29-AM-1024x569.png)
After running the script, I verified within ‘Active Directory Users and Computers’ that the ‘_users’ organizational unit was created and now has all the accounts within it.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-12.59.38-AM.png)
Now with all the user accounts created, you want to have a new VM so that the client could connect to the network using one of the new accounts.
I created a Virtualbox VM and installed a fresh copy of Windows 10 on it. In settings for the VirtualBox I changed the network adapter to ‘Internal Network’ and then completed the installation of Windows 10.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-17-at-3.05.19-PM-1024x615.png)
Now once installation was complete and I’m in the new Vm, I wanted to check that the internet was working. This was done by opening command prompt and using the “ipconfig’ command and could see that it does have a IP address assigned within the range set and has the correct default gateway.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-2.12.05-AM-1024x683.png)
Next within the client computer I changed its name and changed the domain to that of the domain controller and restarted the comp.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-2.17.47-AM-980x1024.png)
Now I logged into the server, opened DHCP and verified there was a new lease for the new client comp.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-2.21.07-AM.png)
The final step is to log into the network with the client computer using one of the newly created user accounts. Doing this will any of the created users login to the network with any client computer.
![](https://blaketechportfolio.com/wp-content/uploads/2023/06/Screenshot-2023-06-16-at-2.22.59-AM-1024x620.png)