In this demonstration,
we're going to deploy several domain controllers in my
timw.info Active Directory domain.
I'm going to use a number of methods to do so,
including PowerShell,
because I can almost guarantee you'll see PowerShell on
your AZ‑800 and AZ‑801 certifications.
So we're looking here, let me minimize Server Manager, at a desktop.
We're signed into what will become rootdc1.timw.info.
It's a Windows Server 2022 machine.
And we'll do this through Server Manager to start.
I'm going to come up here, Manage, Add Roles and Features,
and we'll step through the Add Roles and Features Wizard performing
a role‑based installation on the current server,
yes.
And we'll select Active Directory Domain Services from the list,
which brings up the subcomponents,
including the Active Directory module for Windows PowerShell.
Now,
the exam doesn't split hairs in terms of loading the Active
Directory module under PowerShell Core,
so we're just going to roll because we're just on
Windows throughout this entire track.
We're going to stay with Windows PowerShell,
PowerShell 5.1, and roll from there.
But you can, in fact, do Active Directory PowerShell in PowerShell Core.
Let's click Add Features.
Click Next.
I'm just going to accept the default features.
Click Next.
Now, it mentions here that AD DS requires a DNS server to be installed.
I'm going to go with the default and allow the DNS
server role to be installed in line here.
And we're going to do Active Directory‑integrated zones to make our DNS as
widely available as possible among all domain controllers.
So I'm going to click Install.
And while this is cooking,
let me say that you might be coming into this course with
experience with previous versions of Windows Server wondering
what's changed in Windows Server 2022.
I think that's great if that applies to you.
And you'll see here that the Active Directory installation model
and the procedure works exactly the same in Server 2022 that it
does in Server 2019 and previous versions.
As usual, if you've done this before,
you know that we have Promote this server to a domain controller,
which we can see in Server Manager up here in the notification area.
So I'm going to click Promote this server to be a domain controller.
And let's bring this Active Directory Domain Services Wizard to the front.
Now we see the deployment operations are Add a domain
controller to an existing domain, Add a new domain to an existing forest,
but we're going to create a new forest.
And that root domain name is timw.info, and then we'll click Next.
That's going to be the name of the DNS zone as well.
The functional level, notice, goes from 2008 to 2016.
This is the Active Directory capabilities,
and it's meant for backward compatibility with domain
controllers in the domain that may already be present.
It's not relevant here.
I'm going to make sure that we're a global catalog.
Notice because this is the first DC, we have to have a global catalog.
And we're going to include DNS.
We provide our restore password for Active Directory.
And I'll confirm that, and we'll click Next.
Once I've successfully entered and validated that password,
I'm asked about DNS delegation.
Well, this is the root domain, so we don't have anything to do there.
Let's click Next.
The NetBIOS name is the down‑level name.
Again,
this is history that goes way back to Windows NT and
compatibility with NT LAN Manager protocols.
It's just going to be the first part of your domain name, in my case TIMW.
Click Next.
Verifying the location of our database files
C:\Windows\NTDS and our SYSVOL directory.
That's fine.
And notice the View script here.
This brings up some PowerShell.
Let me zoom in a few levels so that you can see this PowerShell code.
Now AZ‑800 and 801 will have some PowerShell.
So, not as intense as what you get on the Azure exams,
but enough to where you should be generally familiar with it.
And I hope you are anyway, just in the name of administrative automation.
So notice here that we're importing the ADDSDeployment module,
which you get when you install AD DS on a server.
And then to create a new forest, we're going to invoke Install‑ADDSForest.
And then you're basically answering all the questions that we just did.
You'll want to consult the PowerShell Help to
figure out what WinThreshold means.
We've got our DomainName, our NetBIOSName, our ForestMode.
Again, that would be a case where we're consulting PowerShell Docs.
Just look up the command Install‑ADDSForest and you
can see the valid values for that.
But,
this is going to allow you to automate the process of promoting a
server to be a domain controller programmatically.
Let me click Next.
We have our prerequisite check happening.
Once those checks pass, we can click Install.
And we have a whole bunch of stuff happening.
We have the DNS Server server role being installed.
We have the timw.info DNS zone being installed.
Then, of course,
there's laying down Active Directory itself and all of its dependencies.
Now, while we're waiting for this, it's critical for us to modify.
Let me do a run prompt and do ncpa.cpl to open the Network Connections dialog.
We need to make sure that the domain controller is looking to itself for DNS.
So let's look at the TCP/IPv4 properties.
And we can see that I've got a static address for the server,
and we've got under DNS server addresses the preferred DNS server.
I'm just using the localhost 127.0.0.1.
But as I said,
it's critical that you sort out DNS so that the domain controller can use the service itself.