Why don't we pause our work here and let's make an RDP connection to root 2
and we'll install Active Directory on this guy as well.
So let's open up Visual Studio Code and let's first join this server
to the timw.info domain. To join a server or workstation to an AD
domain with PowerShell, we use add computer.
This is just part of the core PowerShell modules,
it's not part of the AD module.
We've got Add‑Computer, we're going to the timw.info ‑DomainName.
The credential is going to be my domain administrator timw\tim
and I've thrown in ‑Verbose ‑Restart and ‑Force just for
automation purposes. So to run this code,
I will right‑click and Run Selection. I'll carefully type my
domain administrator password, and after the domain join, that
force should force the server to restart,
after which it will be a member of the Tim W domain and we can promote it
to become a second domain controller in our root domain.
Okay,
so we've come back on that server, I've signed in as a domain
administrator, and we're back to VS Code. I wanted to let you know to
make sure that you install the PowerShell VS Code module in order to give
you language support for all PowerShell and VS Code. You can grab it
right here from the Extension gallery,
which I've already done, but let me bring up, maximize the view here.
We'll want to do two things to bring up a domain
controller programmatically here.
We're going to install the server role and I'm going to do this in PowerShell,
Install‑WindowsFeature, the name of the feature is AD‑Domain‑Services and I
want to include the ManagementTools. And then to install an additional domain
controller in your domain, we can invoke Install‑ADDSDomainController and I'm
specifying the domain name,
I do want DNS installed, and I'm going to validate that
operation with a domain administrator account. Now,
I'm going to in the interest of time just talk you through installing
a child domain and we can do that again programmatically or in Server
Manager, a number of different ways.
I had originally hoped to show you Windows Admin
Center on the client‑side, but again, in the interest of time,
I will do that in a later lesson.
But the same procedure starts the same,
we want to install the server role on that Child domain controller, and
then we can using the AD DS deployment PowerShell module, which you get
as part of installing AD domain services.
Do an Install‑ADDSDomain and we absolutely want to create a DNS
delegation because my child domain is going to be called
child.timw.info. Just about everything else is the same as what we
did for the primary, the root domain controller, it's just the domain
type here is going to be ChildDomain.
We provide the NewDomainName, the NetbiosName, ParentDomainName, and
importantly, we specify the site and it defaults to the built‑in
catch all Default‑First‑Site‑Name site.
We're going to customize our site configuration in the next
lesson. But I'm not going to actually demo this,
but I'm going to run this code on my CDC1 so I'll wind up at
the end of this process with a read/write domain controller
in the child domain as well.
And then the next demo, I'll show you how to work with,
install from media and setting up a read‑only domain controller.
Okay.
So it looks like we've got success on that installation,
and then to finish this out again,
what we're doing here is we're going to add an additional domain controller
in our forest root domain so I'll provide my domain administrator
credential, set my safe mode administrator password,
have to remember that from how I set it up,
confirm it.
Do I want to continue with this operation?
The target server will be configured as a domain controller and restarted. Y for yes, and away we go.