Как добавить windows server core в домен

Windows Server Core эта хорошая платформа для размещения роли контроллера домена Active Directory из за уменьшенных требования к ресурсам, повышенной стабильности и безопасности (за счет меньшего количества кода и обновлений). В этой статье мы покажем, как установить контроллер домена в новом или существующем лесу Active Directory на Windows Server Core 2016 из консоли с помощью команд PowerShell.

Содержание:

  • Установка контроллера домена Active Directory с помощью PowerShell
  • Диагностика состояния нового контроллера домена на Server Core
  • Установка контроллера домена с помощью Windows Admin Center

Установка контроллера домена Active Directory с помощью PowerShell

Установите Windows Server Core на новый хост (физический или виртуальный), выполните базовую настройку нового сервера: задайте имя сервера, сетевые настройки (статический IP адрес, маску сети, шлюз, DNS), дату/время, часовой пояс и т.д.

Rename-Computer -NewName spb-dc03
Get-NetAdapter
$ip = "192.168.113.11"
$gw="192.168.113.1"
$dns = "192.168.13.11"
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress $ip -AddressFamily IPv4 -PrefixLength 24 –DefaultGateway $gw
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses $dns

Следующий шаг – установка роли Active Directory Domain Services (ADDS). Для этого нужно в консоли PowerShell выполнить команду:

Install-WindowsFeature AD-Domain-Services –IncludeManagementTools -Verbose

Установка роли Active Directory Domain Services (ADDS) в Windows Server COre 2016 с помощью PowerShell

Проверим, что роль AD-Domain-Services установлена:

Get-WindowsFeature -Name *AD*

роль AD-Domain-Services установлена

[/alert]

После установки роли ADDS можно использовать командлеты из модуля ADDSDeployment для развертывания нового домена, леса или контроллера домена:

Get-Command -Module ADDSDeployment

команндлеты разворачивания контроллера домена из модуля ADDSDeployment

Есть три возможных дальнейших сценария:

  • Установка нового леса Active Directory (пример команды:
    Install-ADDSForest -DomainName winitpro.ru -ForestMode Win2012R2 -DomainMode Win2012R2 -DomainNetbiosName WINITPRO -InstallDns:$true
  • Командлет
    Install-ADDSDomain
    позволяет создать новый домен в существующем лесу Active Directory;
  • Install-ADDSDomainController
    – позволяет добавить новый контроллер домена в существующий домен Active Directory

    Если вам нужно создать RODC контроллера домена, используйте командлет
    Add-ADDSReadOnlyDomainControllerAccount
    .

В большинстве случае вы будете использовать 3 сценарий — добавление дополнительного контроллера домена в существующий домен Active Directory

Прежде чем добавлять новый контроллер домена, проверьте, что ваш домен Active Directory работает корректно. Внимательно изучите ошибки на каждом DC, которые возвращает команды
Dcdiag /v
и проверьте репликацию AD (
repadmin /showrepl
и
repadmin /replsum
). Убедитесь, что у вас есть актуальная резервная копия контроллеров домена.

В самом простом варианте, когда вам нужно добавить новый дополнительный DC в Default-First-Site-Name сайт, выполните команду

Install-ADDSDomainController -DomainName "test.com" -InstallDns -Credential (get-credential TEST\Administrator) -DatabasePath "D:\ADDS\DB" -LogPath "D:\ADDS\Log" -SysvolPath "D:\ADDS\SYSVOL"

В этом примере я дополнительно указал, что база данных AD, логи и каталог Sysvol должны храниться на отдельном диске. По умолчанию они хранятся в
%SYSTEMROOT%\NTDS
и
%SYSTEMROOT%\SYSVOL
.

Можно сразу указать нужный сайт Active Directory, в который нужно поместить новый контроллер домена. Также укажем, что данный DC будет Global Catalog и зададим пароль режима восстановления DSRM (Directory Services Restore Mode) через ConvertTo-SecureString:


Install-ADDSDomainController -DomainName test.com -InstallDns:$true -NoGlobalCatalog:$false -SiteName 'SPB' -NoRebootOnCompletion:$true -Force:$true -SafeModeAdministratorPassword (ConvertTo-SecureString 'P@ssw0rd' -AsPlainText -Force) -Credential (get-credential TEST\Administrator) –verbose

установка дополнительного контроллера домена с помощью PowerShell командлета Install-ADDSDomainController

Внимательно исследуйте результаты команды, если все прошло хорошо — перезагрузить сервер:

Restart-Computer

Диагностика состояния нового контроллера домена на Server Core

После окончания установки контроллера домена выполним несколько базовых проверок, чтобы убедится, что новый контроллер домена успешно добавлен в домен, и участвует в репликации.

Вы можете управлять контроллером домена на Windows Server Core с помощью стандартных графических Active Directory (
dsa.msc, gpmc.msc, dnsmgmt.msc, dssite.msc, adsiedit.msc, domain.msc
) оснасток с другого сервера или компьютера Windows 10 с установленным RSAT (
Rsat.ActiveDirectory.DS-LDS.Tool
).

На любом компьютере откройте консоль ADUC и проверьте, что в OU Domain Controllers появился новый DC.

новый контроллре домена в OU Domain Controllers

После перезагрузки сервера Windows Server Core вам нужно авторизоваться на сервере под учетной записью с правами администратора домена.

С помощью комнадлета Get-ADDomainController проверьте, что контроллер домена определяется в правильном сайте:

Get-ADDomainController -Discover

Get-ADDomainController -Discover определение ближайшего сайта AD

Проверьте, что службы Active Directory запущены:

Get-Service adws,kdc,netlogon,dns

проверить, что службы active directory запушены

Кроме скрытых админских шар должны быть опубликованы сетевые каталоги SYSVOL и Netlogon:

get-smbshare

netlogon и sysvol на контроллере домена

Проверьте, что в Event Viewer есть события от служб ADDS:

Get-Eventlog "Directory Service" | Select-Object entrytype, source, eventid, message

Get-Eventlog "Active Directory Web Services" | Select-Object entrytype, source, eventid, message

Затем выполните тест командой dcdiag (все этапы должны быть Passed), и проверьте репликацию между DC командой:

repadmin /replsummary

или

Get-ADReplicationFailure -Target DC03

Установка контроллера домена с помощью Windows Admin Center

Для установки контроллера домена на Windows Server Core также можно использовать веб интерфейс Windows Admin Center (WAC).

  1. Добавьте свой хост с Windows Server Core в интерфейс Windows Admin Center;
  2. Для установки роли ADDS перейдите в раздел Roles and Features, в списке доступных ролей выберите Active Directory Domain Services и выберите Install;
  3. Подтвердите установку роли и средств администрирования;
    установка Active Directory Domain Services через Windows Admin Center

  4. Для повышения сервера до контроллера домена нужно открыть веб консоль PowerShell и воспользоваться рассмотренными выше командлетами для настройки DC;
    powershell консоль в Windows Admin center

  5. После окончания установки DC нужно перезагрузить Server Core и переподключить его в WAC под доменной учетной записью;
  6. Для управления Active Directory из веб интерфейса можно установить специальное расширение WAC (доступно пока в Preview режиме). В результате у вас в Windows Admin Center появится новый раздел, в котором можно просматривать и управлять деревом AD.
    просмотр Active Directory через веб интерфейс Windows Admin Center

Every windows server whenever built & configured in infrastructure are joined to company domain. So in case of windows server core as well there is simple steps on how you should join windows server core to domain of your company.

Active directory plays very critical role in every organization which allows you to join your windows servers & other infrastructure components or devices to domain. So that you can use your domain credentials to login. In order to login using domain credentials your server must be joined to your domain. Joining domain to the server is one time activity where you will use your domain admin credentials to join server into the domain.

In case of windows server core as well you can easily join it to domain using sconfig utility.

So let’s see How to join windows server core to domain:

Step 1:
Login to your Windows Server core first.
You will get the command prompt.
Type “sconfig” & press Enter.

Join Windows Server Core to Domain

Step 2:
You will see server configuration wizard is opened. Where you can perform some basic operations in the windows server core.
Now we want to join windows server core to domain.
For Domain/Workgroup we need to enter number 1. So provide number 1 & press Enter.

Join Windows Server Core to Domain

Step 3:
Provide where you want to join your server domain or workgroup.
You can simply enter D for Domain or W for Workgroup.
Provide D & press Enter.

Join Windows Server Core to Domain

Step 4:
Provide Domain name you want to join your server to.
Provide domain admin username or username who has permission to join server to domains.
Press Enter to continue.

Join Windows Server Core to Domain

Step 5:
You will be asked for the password.
Type the password of the username provided.
Password you type won’t be visible to you.
So you can simply type the password & press Enter.

Join Windows Server Core to Domain

Step 6:
You will be asked if you want to change your computer name before joining to domain.
If you want you can click Yes or click No & continue.

Join Windows Server Core to Domain

Step 7:
Windows server domain joining requires server restart.
So you will be asked to restart the server to join the windows server core to domain.
Click Yes to restart.

Join Windows Server Core to Domain

Once the server is restarted you can press Ctrl-Alt-Del to unlock the server core.

Join Windows Server Core to Domain

Now you will be asked for the password. This is local administrator login.
To use the domain user login press ESC here.

Join Windows Server Core to Domain

Now again you need to press ESC & choose other user to login as a domain user.

Join Windows Server Core to Domain

You can provide your domain user credentials here to login to the windows server core.

Join Windows Server Core to Domain

Now you can type sconfig after login to go to the utility.
Here you can see that our server is joined to the domain successfully.

Join Windows Server Core to Domain

That’s it, Using this way you can easily Join Windows Server Core to Domain.

Note: In this post we have used Windows Server 2019 core edition.

Checkout our Post on How to Install Windows Server 2019 Core Step by Step ?

That’s it for Today Friends. I Hope you liked reading this post & If you find anything more to be added or removed feel free to write it in our comments. If you find it useful You are Feel free to share this on social media to help others & spread knowledge.
If you have any query on any thing you are free to write it in our comments section & we will make sure to provide you the better solution as soon as possible.

Join Our LinkedIn Group to get Fast updates about our posts : Mastering VMware.
Checkout our Facebook Group for discussions & more.
You can also Like & Share our Facebook Page for Latest Updates.

Hi I am Mayur Parmar. Independent Author & Founder of Mastering VMware. I am working in IT industry for more than 4 Years with knowledge of VMware , Microsoft Server’s, Linux Server’s.

In this post, I will show you how to join Windows Server Core to AD domain using SConfig. If you’ve already installed Windows Server Core, it’s easy to connect it to an Active Directory domain. Using the SConfig command, you can join a Windows Server Core to an Active Directory domain.

The Windows Server Core option is a minimal installation option that is available when you deploy Windows Server. The majority of server roles are included in Server Core, but not all of them. Due to its smaller code base, the Server Core has a smaller disk footprint and, as a result, a smaller attack surface. To learn more about the server core, visit this link.

Let’s say you have Windows Server Core installed and want to add it to your AD domain. But before you join the server to the domain, you might want to rename this server. The SConfig utility will be used because a Server Core lacks a Desktop Experience GUI.

Install and Update Third Party Applications with Patch My PC

Install and Update Third Party Applications with Patch My PC

Here are some useful guides related to Windows server core:

  • Find Who Restarted Windows Server Core
  • SCCM Software Center on Windows Server Core
  • How to Install SCCM Client on Windows Server Core
  • Windows Server Core – Enable PXE Responder Without WDS
  • Enable Remote Desktop on Server Core

Using SConfig to Join Windows Server Core to AD Domain

Here are the steps to use SConfig to join Windows Server Core to an Active Directory domain:

  • Login to the Windows Server core with local administrator account.
  • Type SConfig at the command prompt and press Enter.
  • From the list of options, choose Option 1 (Domain/Workgroup) by typing 1 and press ENTER.
  • To join the server to the domain, type D and press ENTER.
  • Specify the domain name and a valid user for this domain (domain\user). Type the user password when prompted.
  • Reboot the server.

Every organization has a computer naming scheme. Windows Server Core is given a random computer name when you install it. Using the SConfig utility, you can change the name of the computer when you join Server Core to an Active Directory domain. Type “SConfig” and press Enter.

Launch SConfig on Windows Server Core

Launch SConfig on Windows Server Core

On the Server Configuration windows, you’ll see a list of server management options. From the list of options, select type 2, which is typically used to change the computer name. Enter the new computer name for Server Core and press Enter. You see a pop-up asking you to restart the computer; click Yes.

Set Computer Name for Windows Server Core

Set Computer Name for Windows Server Core

Login to the server again and type SConfig to get to the Server Configuration screen. The computer name is now changed. To join the Windows server core to an Active Directory domain, type 1.

Join Windows Server Core to AD Domain

Join Windows Server Core to AD Domain

Now you see the option to Change Domain or Workgroup Membership, type D and press Enter. Specify the domain name and the authorized domain/user. The password for the domain account must be entered at a new command prompt that appears.

Join Windows Server Core to AD Domain

Join Windows Server Core to AD Domain

While joining the server core to the domain, you also get an option to change the computer name before restarting. Since we have already changed the computer name in the above step, click No.

Join Windows Server Core to AD Domain

Join Windows Server Core to AD Domain

After joining the Windows Server core to the AD domain, you must restart the server to finish the joining process. Click Yes to restart the server.

Join Windows Server Core to AD Domain

Join Windows Server Core to AD Domain

After the system reboots, login to the server and type SConfig. Now we see that the server core is joined to the AD domain. You can now log in to the server with domain credentials and manage other aspects of the server.

Join Windows Server Core to AD Domain

Join Windows Server Core to AD Domain

Still Need Help?

If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.

Prajwal Desai

Prajwal Desai is a technology expert and 10 time Dual Microsoft MVP (Most Valuable Professional) with a strong focus on Microsoft Intune, SCCM, Windows 365, Enterprise Mobility, and Windows. He is a renowned author, speaker, & community leader, known for sharing his expertise & knowledge through his blog, YouTube, conferences, webinars etc.

Данная статья предназначена для тех, кто искал подробное и понятное руководство о том, как присоединить Windows Server 2019 Server Core к домену.

Мы будем рассматривать тот случай, когда у вас уже есть два сервера с установленной на них операционной системой Windows Server 2019. Кроме того, на одном из серверов должна быть установлена роль Active Directory Domain Services.

Подробно о том, как установить Windows Server 2019, вы можете прочитать в моем руководстве “Установка Windows Server 2019 Server Core”.

Узнать о том, как установить Active Directory Domain Services на Windows Server 2019 с GUI, вы можете, прочитав “Установка Active Directory Domain Services на Windows Server 2019”.

Также в моем руководстве “Установка Active Directory Domain Services на Windows Server 2019 Server Core”, вы можете узнать о том, как установить Active Directory Domain Services на Windows Server 2019 Server Core без GUI.

Перед присоединением сервера в домен необходимо присвоить серверу корректное имя в соответствии со стандартами вашей организации, а затем присвоить статический IP-адрес, маску подсети, шлюз и IP-адрес контроллера домена в качестве сервера DNS, в настройках сетевого интерфейса.

Заходим в систему под учетной записью с правами администратора и запускаем Windows PowerShell с помощью команды:

powershell

Присоединение Windows Server 2019 Server Core к домену

В данном руководстве сервер присоединяется к домену heyvaldemar.net с использованием учетной записи Administrator, которая обладает правами администратора домена.

Присоединяем сервер к домену с помощью команды:

Add-Computer DomainName heyvaldemar.net -Credential heyvaldemar\Administrator -Restart Force

Присоединение Windows Server 2019 Server Core к домену

Указываем пароль от учетной записи с правами администратора домена и нажимаем на кнопку “OK”.

Присоединение Windows Server 2019 Server Core к домену

После перезагрузки, к сервер будут применены политики безопасности, используемые в вашем домене.

Присоединение Windows Server 2019 Server Core к домену

После применения политик безопасности, сервер будет готов к работе.

Присоединение Windows Server 2019 Server Core к домену


Эксклюзивы для подписчиков Patreon

Присоединяйтесь к моему Patreon и погрузитесь в мир Docker и DevOps. Здесь вас ждет эксклюзивный контент, разработанный специально для энтузиастов и профессионалов в области IT. Вашим наставником будет Владимир Михалев, опытный специалист, предлагающий ряд уровней членства от новичков до экспертов.

Что вы получите

🏆 Посты только для патронов: Полный доступ к глубоким статьям, которые раскрывают методы работы с Docker и DevOps, включая пошаговые инструкции, продвинутые советы и подробные анализы, недоступные широкой публике.

🏆 Ранний доступ: Получите возможность первыми узнавать о новых материалах и обучающих программах, опережая технологические тренды.

🏆 Приоритетная поддержка: Ваши вопросы и проблемы будут решены в первую очередь, обеспечивая индивидуальный подход и непосредственную помощь.

🏆 Влияние на будущий контент: Ваши предложения и отзывы напрямую влияют на выбор тем и создание учебных пособий, делая материалы максимально актуальными и полезными.

🏆 Признание и взаимодействие: Активные участники и поддерживающие пользователи получают благодарности в видео и на публичных трансляциях, подчеркивая вашу значимость для нашего сообщества.

🏆 Особые скидки: Наслаждайтесь скидками на курсы и предстоящие мероприятия, которые доступны исключительно для членов Patreon.

🏆 Возможности для нетворкинг: Общайтесь с другими IT-специалистами и энтузиастами в поддерживающей атмосфере, расширяя вашу профессиональную сеть и обмениваясь знаниями.

🏆 Искренняя благодарность и обновления: Личная благодарность за вашу поддержку, которая стимулирует создание нового контента и постоянное развитие.

Присоединяйтесь ко мне сейчас и начните свое путешествие по освоению Docker и DevOps с эксклюзивными материалами и поддерживающим сообществом!

Мои курсы

🎓 Погрузитесь в мои обширные курсы по информационным технологиям, разработанные как для энтузиастов, так и для профессионалов. Независимо от того, хотите ли вы освоить Docker, покорить Kubernetes или углубить свои навыки в области DevOps, мои курсы предлагают структурированный путь к повышению вашего технического мастерства.

Мои услуги

💼 Загляните в мой каталог услуг и узнайте, как мы можем сделать вашу технологическую жизнь лучше. Будь то повышение эффективности вашей IT-инфраструктуры, развитие вашей карьеры или расширение технологических горизонтов — я здесь, чтобы помочь вам достичь ваших целей. От DevOps-трансформаций до сборки игровых компьютеров — давайте сделаем ваши технологии непревзойденными!

Пополнить запасы моего кофе

💡 Telegram | Boost

💖 PayPal

🏆 Patreon

💎 GitHub

🥤 BuyMeaCoffee

🍪 Ko-fi

Подпишись

⭐ Telegram | Блог

🎬 YouTube

🐦 Twitter

🎨 Instagram

🐘 Mastodon

🧵 Threads

🎸 Facebook

🧊 Bluesky

🎥 TikTok

💻 LinkedIn

📣 daily.dev Squad

🧩 LeetCode

🐈 GitHub

Этот контент создан искусственным интеллектом?

Нет! Каждая статья — результат моей работы, наполненной страстью к Docker и десятилетиями опыта в IT. Я применяю ИИ для улучшения грамматики, чтобы обеспечить четкость технических деталей, однако все идеи, стратегии и рекомендации исключительно мои. Этот метод иногда может вызывать срабатывание детекторов ИИ, но можете быть уверены, что вся представленная информация и опыт — подлинно мои.

This guide will show you how to add a new domain controller to an existing Windows Active Directory Domain on a Server Core 2022 system.

My last post covered creating a new forest and domain, and converting a Windows Server Core machine to a domain controller. In this post, we’re going to build on that, and run through how to add another domain controller into the mix.

Like last time, these instructions are based on a Windows Server Core 2022 system, but the Powershell commands are equally applicable to servers running the Desktop Experience, and to Server 2019 and Server 2016 systems.

Server Configuration

As before, we first need to make sure we have set some basic stuff. This can be done from the server config window (sconfig) which opens by default on Server 2022 Core. For older versions (2019, 2016), run sconfig.

  • Hostname — important. This will be the name of your domain controller. As this is a second DC, it’s best to +1 from the name of the first one.
  • Date and time. Make sure the date/time is right and set your timezone.
  • IP and DNS. Make sure you have a static IP set. We’re also installing the domain DNS service, and we can’t have a DNS server running with a dynamic IP. The DNS should be pointing to an existing domain controller (so it knows where to find the domain we want to join).
  • Enable remote desktop. Optional.

Install the AD-Domain-Services Feature

Exit from sconfig to the command prompt. Server 2022 defaults to powershell. If you end up somewhere else, enter into a powershell prompt with powershell.

Enter the command:

Install-WindowsFeature AD-Domain-Services

Optional things: –IncludeManagementTools, -Verbose

As before, we’re running this on Server Core, so we don’t need the management tools. You might include this on a full Desktop Experience system.

Add Domain Controller

Some of the information we specified before isn’t needed when adding a new DC to an existing domain (the forest and domain level are inferred from the domain).

The command we need to run is surprisingly short:

Install-ADDSDomainController -DomainName 'ad.dictive.tech' -Credential (Get-Credential "AD\your-domain-admin") -InstallDns:$true

Because the domain now exists, we need to authenticate against it, so we need to enter a user account that has domain join permissions. Get-Credential prompts for the password, so we don’t have to visibly type it into Powershell.

After hitting enter, we’ll get the prompt to create a safemode password, like before.

The process will take as long as last time, and should look quite familiar by now. Once it has finished, we’ll need to make one last change.

Login and run sconfig if required. We want to change the DNS address for the new domain controller, and also go back and change the DNS for the first DC.

For the new one, set the primary IP address as dc01’s IP. Set the secondary to 127.0.0.1 (the loopback address of this new DC/DNS server). On DC01, do the same thing, except set the primary DNS address to be dc02’s IP, with the secondary being 127.0.0.1.

Microsoft’s advice on the DNS address ordering for DC/DNS servers has changed over the years, as such, there are conflicting opinions. Setting the primary to another DC, and the secondary to its own loopback address seems to be as close to a consensus as we’re likely to get.


That’s it! If you’ve followed this guide, and the previous post, you’ve now got at least 2 domain controllers, meaning your setup is far more resilient than before! If you have any questions or comments, please let me know below, or you can find me at @techbitsio.



Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Драйвера для обнаружения жесткого диска при установке windows 10
  • Картинка ошибка windows 10
  • Acer aspire v3 571g drivers windows 10
  • Canon lbp7010c 7018c драйвер windows 10
  • Sku продукта не найден windows 10