New Windows 2022 Domain Controller

The Domain Controller in my home lab currently runs on a Windows 2012 server. It is time to UPGRADE! So I went and downloaded a Windows Server 2022 ISO and deployed a new VM running Windows Server 2022 Std Edition. Lets build a Windows Server 2022 Domain Controller and retire my Windows 2012 DC.

Next, it was time to install Active Directory Domain Services!

Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools

Once it finishes, you want to verify that installation was successful by looking in the SUCCESS column for TRUE. If the response is false, you’ll want to go into the event log to see why it failed.

Next, we want to join this new DC to my lab domain.

Install-ADDSDomainController -Domainname "lab.local" -InstallDNS:$true -Credential (Get-Credential "lab\ben")

This will force the server to automatically reboot. Once you login, you’ll see the AD / DNS services running.

Now, we need to demote my existing domain controller! The first step is to import the ADDSDeployment module. If you’re not sure it imported, as there’s no response, you can use the Get-Command cmdlet to list the cmdlets for that module.

Import-Module ADDSDeployment
Get-Command -Module ADDSDeployment

Next, we can demote the domain controller to be a regular member server. A popup will be displayed asking for the local administrator credentials.

Uninstall-ADDSDomainController -LocalAdministratorPassword (Get-Credential).Password

The command ran successfully. You’ll be prompted that you’ll be signed out and the system will restart.

Next, we can switch to the new Windows 2022 server and upgrade the domain Functional Level.

Import-Module ActiveDirectory
Set-ADDomainMode lab.local -DomainMode Windows2016Domain

Now, the last thing I have to do is shutdown my Windows 2012 R2 VM, and then give my new DC the old DC’s IP Address!

Ben Liebowitz, VCP, vExpert
NJ VMUG Leader

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.