Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- Now click Next on the Review Options screen.
- Open Server Manager from the Start menu.
Type y in the PowerShell window and press ENTER to confirm that you want to configure the server as a domain controller. Table of Contents [hide]
- Install Active Directory Domain Services on Windows Server 2022 with PowerShell
- Windows Server 2022 prerequisites
- Install the Active Directory Domain Services role
- Install Active Directory Domain Services on Windows Server 2022 with Server Manager
- Windows Server 2022 prerequisites
- Install the Active Directory Domain Services role
- Configure (promote) Windows Server 2022 as a domain controller with PowerShell
- Configure (promote) Windows Server 2022 as a domain controller with Server Manager
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) On my network, I will assign a static IP address of 192.168.1.10, subnet mask of 255.255.255.0, and the default gateway is 192.168.1.1.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) Install-ADDSForest -DomainName ad.contoso.com -DomainNetBIOSName AD -InstallDNS Install-ADDSForest -DomainName ad.contoso.com -DomainNetBIOSName AD -InstallDNS
Install-ADDSForest -DomainName ad.contoso.com -DomainNetBIOSName AD -InstallDNS
Now that the AD DS role is installed in Windows Server 2022, you can configure your first AD domain controller. Let’s go back to Server Manager and start the configuration. Set-DNSClientServerAddress –InterfaceIndex (Get-NetAdapter).InterfaceIndex –ServerAddresses 192.168.1.10 Set-DNSClientServerAddress –InterfaceIndex (Get-NetAdapter).InterfaceIndex –ServerAddresses 192.168.1.10
Set-DNSClientServerAddress –InterfaceIndex (Get-NetAdapter).InterfaceIndex –ServerAddresses 192.168.1.10
- On the Installation Type screen, make sure that Role-based or feature-based installation is selected and click Next.
Configure (promote) Windows Server 2022 as a domain controller with PowerShell
- Log in to Windows Server 2022 with a local administrator account.
- Open the Start menu and click the Windows PowerShell
You should note that Install-ADDSForest is only used when you are installing the first domain controller in a new AD forest. Install-ADDSDomain and Install-ADDSDomainController are used respectively to create a new domain in an existing forest and install a new DC in an existing AD domain. Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- You’ll be prompted to restart the server. Click OK and then click Close in the System Properties dialog.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- Restart the server.
- Back in Server Manager, you should see a yellow exclamation mark by the notifications flag in the top-right corner. Click it and then click Promote this server to a domain controller.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
Windows Server 2022 prerequisites
Whichever method you choose, adding Windows Server 2022 as a DC involves two main steps:
- Click Restart Now in the popup dialog.
Now let’s set a static IP address.
- In the Active Directory Domain Services Configuration Wizard dialog, check Add a new forest under Select the deployment operation.
Once the AD DS server role is installed, you’ll get a message in the PowerShell window. The Success column should read True.
- In the Network Connections window, right click your server’s network adapter and select Properties from the menu.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) Before we install AD DS, let’s make sure we meet the basic prerequisites for a DC in Windows Server 2022.
- In the System Properties dialog, click the Change button on the Computer Name tab.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) Now let’s install the AD DS server role.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- Log in to Windows Server 2022 as an administrator.
As AD is configured, you’ll see some yellow warnings appear in the PowerShell window. They are normal and you can safely ignore them. The server will automatically reboot. Once Windows Server has rebooted, you will need to log in with the domain administrator account. The domain administrator account is assigned the same password as the built-in administrator account. Let’s deal with the server’s name and IP address first. Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) The first DC in your domain will also be a DNS server. The Active Directory Domain Services Configuration Wizard will automatically configure a DNS server for you.
- In the Ethernet Properties dialog, click Internet Protocol Version 4 (TCP/IPv4), and then click Properties.
- On the Server Selection screen, make sure that your Windows Server is selected in the list and click Next.
If you’d prefer to install AD DS the hard way, here is a step-by-step guide using Server Manager.
- Installing the Active Directory Domain Services (AD DS) server role binaries.
Rename-Computer -NewName DC1 Rename-Computer -NewName DC1
Rename-Computer -NewName DC1
- On the sign-in page, type administrator in the User name Type the password for the administrator account, which is the same as the password for the previous built-in administrator account, and press ENTER.
- In Server Manager, click the Manage menu in the top-right corner and select Add Roles and Features from the menu.
- Read the information on the AD DS screen and click Next.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) There are two ways for system administrators to add Windows Server 2022 as a domain controller (DC). The first is using Server Manager, which has been the standard way to add, or ‘promote’ as is more commonly referred to, Windows Server 2022 as a DC. The second way, and easier way in my opinion, is to use PowerShell.
- How to add a new domain controller to an existing domain
- Click Next on the Features screen.
Install the Active Directory Domain Services role
When you run the Install-ADDSForest cmdlet, you’ll be prompted to enter a password for Directory Services Restore Mode (DSRM). Or Safe Mode password as it’s sometimes referred to. Enter a password and confirm it when prompted. Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- In Server Manager, click Local Server in the left pane.
Install Active Directory Domain Services on Windows Server 2022 with Server Manager
Windows Server 2022 prerequisites
To configure Windows Server 2022 as a domain controller, run Install-ADDSForest as shown in the example below. Replace ad.contoso.com with your chosen FQDN. DomainNetBIOSName is usually set to the part of your FQDN that identifies your internal AD DNS namespace. So, the part that comes to the left of the first period. In this case, ‘ad’. You’ll then see a message:
- In the Internet Protocol Version 4 (TCP/IPv4) Properties dialog, check Use the following IP address. You’ll need to fill out the following three fields: IP address, Subnet mask, Default gateway.
And that is it! You are now logged in to your AD domain’s first domain controller.
- In the left pane of the Settings app, click Ethernet under Network & Internet.
Windows Server 2022 doesn’t include any significant changes to Active Directory (AD). But you will want to use it going forwards for your new domain controllers because of the improved security it provides over earlier versions of Windows Server.
- In the PowerShell window, run the command below and press ENTER. Replace ‘DC1’ with the name that you would like to use for your domain controller.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- In the right pane under Related settings, click Change adapter options.
- Log in to Windows Server 2022 as an administrator.
- On the Domain Controller Options screen, type and confirm a Directory Services Restore Mode (DSRM) password. You will need this if you want to restore AD from backup. Click Next to continue.
New-NetIPAddress –IPAddress 192.168.1.10 -DefaultGateway 192.168.1.1 -PrefixLength 24 -InterfaceIndex (Get-NetAdapter).InterfaceIndex New-NetIPAddress –IPAddress 192.168.1.10 -DefaultGateway 192.168.1.1 -PrefixLength 24 -InterfaceIndex (Get-NetAdapter).InterfaceIndex
New-NetIPAddress –IPAddress 192.168.1.10 -DefaultGateway 192.168.1.1 -PrefixLength 24 -InterfaceIndex (Get-NetAdapter).InterfaceIndex
- Log in to Windows Server 2022 with a local administrator account.
- Now click Install to configure AD on the server. The server will automatically reboot to complete the install process.
- On the Additional Options screen, click Next to accept the assigned NetBIOS name.
- In the PowerShell window, run the New-NetIPAddress command below and press ENTER. Replace the values for IPAddress, DefaultGateway, and PrefixLength to those provided by your network administrator.
Install Active Directory Domain Services on Windows Server 2022 with PowerShell
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) Once the server has rebooted, we can configure the network adapter with a static IP address. On my network, I will assign a static IP address of 192.168.1.10/24 and the default gateway is 192.168.1.1.
- In the Root domain name box, type the Fully Qualified Domain Name (FQDN) for your new AD forest. I’m going to use contoso.com for my AD domain name. Click Next to continue.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
- Right click the network icon in the system tray in the bottom right of the taskbar and click Open Network & Internet settings.
On the sign-in page, type administrator in the User name field. Type the password for the administrator account, which is the same as the password for the previous built-in administrator account, and press ENTER. You should make sure that you own the public top-level domain name (TLD). In this example, I should own the contoso.com domain name. AD in the FQDN defines my internal DNS namespace for Active Directory.
- Check Use the following DNS server addresses. Set Preferred DNS server to the same IP address that you assign Windows Server. So, in my example, I will use 192.168.1.10. Click OK when you’re done.
- Close the Ethernet Properties dialog, Network Connections window, and the Settings app.
Get-Help Install-ADDSForest Get-Help Install-ADDSForest
Get-Help Install-ADDSForest
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) Do you want to continue with this operation?
- In the Add Roles and Features Wizard popup dialog, make sure that Include management tools (if applicable) is checked and then click Add Features.
- In the Computer Name/Domain Changes dialog, type a name for your server in the Computer name field and click OK.
- On the DNS Options screen, you can safely ignore the delegation warning and click Next.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith)
Configure (promote) Windows Server 2022 as a domain controller with Server Manager
- Promoting the server to a domain controller.
- In the Add Roles and Features Wizard, click Next on the Before You Begin screen.
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools
Install-WindowsFeature -name AD-Domain-Services -IncludeManagementTools
- Now configure the adapter’s DNS settings. We’ll set the preferred DNS server to be our domain controller’s IP address because the domain controller will also perform the function of DNS server for the domain. So, replace 192.168.1.10 with the same IP address you configured for the adapter. Run Set-DNSClientServerAddress as shown, and press ENTER.
- When the installation is complete, click Close in the Add Roles and Features Wizard.
Once Windows Server has rebooted, you will need to log in with the domain administrator account. The domain administrator account is assigned the same password as the built-in administrator account. The target server will be configured as a domain controller and restarted when this operation is complete.
- On the Server Roles screen, check Active Directory Domain Services in the list of roles.
And that is it! You are now logged in to your AD domain’s first domain controller. You can access Server Manager from the Start menu. In Server Manager, click the Tools menu and then select Active Directory Users and Computers to start managing your domain. The next step is to install the AD DS server role. It’s easy to do using the Install-WindowsFeature cmdlet as shown below.
- Click Next on the Server Roles screen to continue.
Install the Active Directory Domain Services role
- Server Manager should open by default. If it doesn’t, click the Start menu and find Server Manager in the list of installed apps and click it.
We’ll start by renaming the server. The wizard will run some prerequisite checks to make sure AD can be installed on the server. Hopefully your server will pass the checks and you can continue installing AD. It’s normal to get a few warnings as you can see in the image below. You will not be able to proceed with the install if the server fails the prerequisite checks.
- Click Next again on the Paths screen to accept the default database, log files, and SYSVOL folder locations.
Add Windows Server 2022 as a Domain Controller (Image Credit: Russell Smith) DomainName and DomainNetBIOSName are the only two compulsory parameters for the Install-ADDSForest cmdlet. If you want to explore what other options you can configure, run the command line below:
- Now click Install on the Confirmation screen.
But it’s also noting that there are some prerequisites that you should meet before adding Windows Server 2022 as a DC. For instance, the server should be assigned a static IP address. And it’s also worth making sure that the server name is something relevant, like DC1, so that it can easily be identified. In this example, we will add Windows Server 2022 as a domain controller in a new forest and domain. Before you continue, you should decide on a Fully Qualified Domain Name (FQDN) for your domain. I’m going to use ad.contoso.com in this example. Where ‘ad’ is the name of my new domain and contoso.com is the top-level domain (TLD). You should make sure that you own the public TLD. In this example, I should own the contoso.com domain name. AD in the FQDN defines my internal DNS namespace for Active Directory.
- In the Properties section on the right, click your server’s computer name to the right of the Computer name
Active Directory lets companies manage users, computers, printers, and more from a centralized location. Have you wanted this functionality at home but don’t have money for Windows Server? Here’s how you can promote Windows Home Server to a domain controller. Maybe you don’t have 100+ computers in your closet but sometimes it may feel that way. Active Directory allows you to centrally manage the users that can log into the machines as well as help quickly set up machine preferences and can even help manage your virtual machines. If you have been wanting a better way to manage it all, or even just want to dive into Active Directory here’s how you can do it on the cheap. Please be aware that Microsoft specifically says you are not allowed to do this according to their end user license agreement (EULA) that you have to agree to when installing or setting up a Windows Home Server. As such, this article will be strictly for educational purposes.
If you are allergic to breaking EULAs I suggest you purchase Windows Server from Microsoft. Select students on the other hand can freely download Windows Server from Microsoft DreamSpark. After your initial setup of Windows Home Server you will need to turn on remote desktop abilities from the Windows Home Server console. If you are reading this article I am going to assume you know how to do that yourself. You will also need a couple of dedicated disks or partitions for storing Active Directory information. Active directory uses the folders NTDS and SYSVOL to store its database and public files and if they are not on dedicated disks you most likely see slowdown with your server and with your network. Active Directory requires that you have DNS and a static IP address on your server. You don’t have to do these two steps right now, but you will need to be prepared to do them during the process. Promoting your WHS to a domain controller is going to do a few things that you may not want. Please read the below precautions before continuing.
- You will no longer be able to add computers to WHS with the WHS connector. From now on you will have to join computers to your new domain that you will set up. In order to be able to add computers to a domain you cannot use any of the “home” variants of Windows and instead will need to use the business, professional, or enterprise tiers.
- All of your users in WHS will be erased and only the default user accounts (e.g. administrator, guest, etc.) will be left in WHS.
- Your WHS webpage will be broken. You can “fix” this by installing another web server (e.g. Apache) but it will take more setup and work.
All in all, be prepared to do a fresh install on your WHS and do not do this on a machine you are actively keeping information on. It would probably be a better idea to have a second computer to set up AD and migrate any information over that you want. Always have backups, if this is a computer you use it is your responsibility to make a backup before you start this process.
Promote Your Server
Domain controller promotion is done through the dcpromo.exe command. Go remote with your server and then open the run dialog and run the command. Click next a couple times and then select the option to create a new controller for a new domain.
Then select new domain forest.
Next it is best to select to set up DNS on the local machine. This is the easiest way to get the controller configured. You will just have to make sure you turn off DNS on your router. If you are going to keep DHCP issued from your router you will also need to point DNS responsibilities to your server. Please check your router manual for how to do that.
Finally we can name the new domain. If you own a web domain name don’t name it the same thing as your domain name because in this case it may cause problems unless you are also running the web service and dynamic DNS updater from this computer. Instead it is a better idea to come up with a .local name for your domain.
Next you will need to put in a NETBIOS name. You should be able to select the default and just click next.
We need to tell the domain controller where to store the database, log files, and public files. It is recommended to store all of this on a separate hard drive. In my installation I have a separate 20 Gb hard drive plugged in (E:) where I have put the required files.
If you have any pre-Windows 2000 computers I feel bad for you. In most cases you can leave out support for anything that old in the next step.
Select a new Administrator password.
And then review your changes and click next.
Your promotion will start the process for you.
You will probably be asked for your installation CD at some point so make sure you have your CD (or the files from your CD) available to you.
You will also probably be prompted to change your IP address from dynamic to static during the process.
Click OK and then continue to change your IP address to a suitable static address.
Your setup should finish with this screen. Once you click finish go ahead and restart your new domain controller. Don’t worry if the reboot takes a while. It needs to start up a lot new services and will probably take a while for the first reboot.
Once the machine reboots you may get an error about a service failing to start. You should also have a new option at your login screen to log into the new domain you just created.
Post Installation Settings
Now that you have a domain and a domain controller there are just a couple of things we need to do to make sure things run smoothly. First we can fix the services error we got before by going to start -> run -> “services.msc” Find the “SSDP Discovery Service” and the “Universal Plug and Play Device Host” services and set them to start automatically. Then start the services manually.
Now browse to C:\Windows\Temp. Right click on the folders and choose properties.
On the security tab click add and then type network service and click check names. Once the name is verified (it will be underlined) click OK.
Repeat the above two steps for the c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files directory too. Now we need to configure the Windows Firewall to allow for the correct programs to get through. You could just disable the firewall but you will take a performance hit by just disabling it. Here are the ports and programs you will need to allow access through your firewall.
To add a program exception click on the exceptions tab and then click add program. Browse to the dns.exe located in the c:\windows\system32 folder and then click change scope.
Change the scope to only be on your local subnet because you don’t want anyone outside of your network using your DNS for lookups.
Next do the same thing for the DHCP server located at C:\WINDOWS\system32\tcpsvcs.exe but don’t limit the scope. Instead allow any computer to connect to DHCP otherwise the computers will never get an IP address after we turn that on. We won’t set up DHCP in this article but may revisit this in the future. If you want to know how to set up DHCP check out the we got served link at the end of this post. Go back to the main exceptions tab and then click add port. Type in LDAP for the name and 389 for the port number. Change the scope to my network (subnet) only and then click OK.
Repeat these steps for the following additional ports. LDAP – 389 – UDP LDAP – 636 – TCP LDAP – 3268 – TCP Kerboros – 88 – TCP and UDP You now have Active Directory all set up and the necessary ports required to join computers to your new domain and begin managing users, computers, printers, and much more from a central location. we got served wiki READ NEXT
- › Roundup: The Best Windows Home Server Apps
- › What is a Windows Domain and How Does It Affect My PC?
- › 8 Default Microsoft Word Settings You Should Change
- › The Best VoIP Services of 2022
- › 5 Technologies That Mean You Can Never Believe Anything on the Internet Again
- › How Much Worse Is the Xbox Series S, Really?
- › HBO Max and Discovery+ Will Merge Sooner Than Expected
- › Here’s When Windows 10 Will Delete Internet Explorer
- How to tell someone that youre suicidal
- How to receive bitcoin
- How to turn on dark mode in google docs
- How to eat cheese
- How to get strawberry seeds