기존 도메인에 도메인 컨트롤러 추가하는 방법 (PowerShell)

도메인 컨트롤러(DC)를 기존 Active Directory(AD) 도메인에 어떻게 추가하나요? 이 글에서는 AD에 새 DC를 신속하게 추가하는 방법을 보여드리겠습니다.

이 기사는 다음에 적용됩니다: Windows Server 2025, Windows Server 2019, Windows Server 2022, Windows Server 2016

도메인 및 포리스트 기능 수준 확인

기존 도메인에 Windows Server 2025 도메인 컨트롤러를 추가하는 주된 전제 조건은 도메인 기능 수준이 Windows Server 2016을 실행해야 한다는 것입니다. 도메인 및 포리스트 기능 수준을 확인하기 위해 PowerShell을 사용할 수 있습니다.

Get-ADForest | fl Name, ForestMode
Get-ADDomain | fl Name, DomainMode
Using PowerShell to confirm the forest and domain functional levels

Windows Server 설치 및 서버 이름 변경

초기 설정에는 새로운 가상 머신을 실행하고 Windows Server를 설치하는 것이 포함됩니다. 설정이 완료되면 이 PowerShell 명령을 사용하여 컴퓨터 이름을 변경할 수 있습니다.

Rename-Computer -NewName "WS25-DC5" -Restart

SConfig를 사용하여 업데이트 확인

재부팅 후 PowerShell에서 ‘SConfig’ 프로그램을 사용하여 업데이트를 확인하고 설치할 수 있습니다. (이미 설치되어 있으므로 대기 중인 업데이트는 없습니다)

Using SConfig to check for and install Windows Updates

한 번 더 재부팅 후, 서버에 고정 IP 주소를 할당해야 합니다. 다음은 명령어입니다.

New-NetIPAddress –IPAddress 192.168.1.138 -DefaultGateway 192.168.1.254 -PrefixLength 24 -InterfaceIndex (Get-NetAdapter).InterfaceIndex

Set-DNSClientServerAddress –InterfaceIndex (Get-NetAdapter).InterfaceIndex –ServerAddresses 192.168.1.240,192.168.1.241

이 명령은 기본 게이트웨이로 192.168.1.254에 대한 정적 IP 192.168.1.38을 할당하고 첫 번째 두 개의 DC를 DNS 서버로 추가합니다. 다음에 컴퓨터를 도메인에 가입할 때 필요합니다.

All set to join to AD and promote to DC

Windows Server를 Active Directory 도메인에 가입

다음 단계는 컴퓨터를 AD 도메인에 가입하는 것입니다 – reinders.local. 한 단계에서 이 프로세스를 처리하기 위해 이 명령을 사용해 봅시다.

Add-Computer -DomainName "reinders.local" -Restart
Using PowerShell to join my server to my domain

AD DS 서버 역할 설치

재부팅 후에는 도메인 관리자 계정(mreinders)으로 서버에 로그인합니다. 우리는 준비가 되어 있습니다 – 먼저 이 명령을 실행하여 Active Directory Domain Services (ADDS) 역할을 설치할 수 있습니다.

Install-WindowsFeature -Name AD-Domain-Services -IncludeManagementTools
Installing the AD Domain Services role with PowerShell

서버를 도메인 컨트롤러로 승격

이 작업을 완료하면 서버를 DC로 승격하기 위해 이 명령을 실행할 수 있습니다.

Install-ADDSDomainController -DomainName "reinders.local" -InstallDns -Credential (Get-Credential) -Confirm:$false

간단히 알림 – 이 변경을 허용하려면 일시적으로 도메인 관리자 계정을 Enterprise Admins 그룹에 추가해야 합니다. Enterprise Admins 그룹에 계정을 추가하려면 Petri.com의 PowerShell을 사용하여 Active Directory 그룹 관리를 확인하세요.

Windows is configuring the server to be a DC

그 작업을 완료한 후에 Windows가 재부팅하라는 메시지를 표시했습니다.

After that is complete, we need to reboot. Notice the AD schema version was updated…

한 번 더 재부팅한 후에 모든 준비가 끝났습니다. PowerShell을 사용하여 5개의 DC가 있는지 확인할 수 있습니다.

Get-ADDomainController -Filter * | Select-Object Name, IPv4Address, OperatingSystem

기존 AD 도메인에 새로운 도메인 컨트롤러로 Windows Server 서버를 추가하는 내 게시물을 읽어 주셔서 감사합니다.

Source:
https://petri.com/add-domain-controller-to-existing-domain-powershell/