Как установить active directory на windows server 2012 r2

В данном руководстве подробно описан и продемонстрирован процесс установки роли Active Directory Domain Services (контроллер домена) на Windows Server 2012 R2. Для установки роли Active Directory Doma

В данном руководстве подробно описан и продемонстрирован процесс установки роли Active Directory Domain Services (контроллер домена) на Windows Server 2012 R2.

Для установки роли Active Directory Domain Services на Windows Server 2012 R2 потребуется компьютер, под управлением Windows Server 2012 R2 (О том как установить Windows Server 2012 R2 можно прочитать в данной статье: «Установка и активация Windows Server 2012 R2 c USB флешки» ).

I. Настройка имени сервера и статического IP-адреса

1.Откройте Пуск > Компьютер (пр. кнопкой мыши) > Свойства (Рис.1).

Рис.1

.

2. В открывшемся окне выберите Изменить параметры (Рис.2).

Рис.2

.

3. В Свойствах системы выберите вкладку Имя компьютера и нажмите Изменить… . В появившемся окне укажите новое имя сервера в поле Имя компьютера (прим. в данном руководстве это SERVER2012R2), затем нажмите ОК (Рис.3).

Рис.3

.

4. Система предупредит о том, что для применения новых настроек необходимо перезагрузить сервер. Нажмите кнопку ОК (Рис.4).

Рис.4

.

5. После перезагрузки, в правом нижнем углу кликните (пр. кнопкой мыши) на иконке сетевого соединения. В открывшемся меню выберите Центр управления сетями и общим доступом (Рис.5).

Рис.5

.

6. В открывшемся окне выберите Изменение параметров адаптера (Рис.6).

Рис.6

.

7. В открывшемся окне Сетевые подключения нажмите правой кнопкой мыши на сетевом подключении и выберите пункт Свойства. В появившемся окне выделите Протокол Интернета версии 4 (TCP/IPv4) и нажмите Свойства (Рис.7).

Рис.7

.

8. В свойствах, на вкладке Общие выберите пункт Использовать следующий IP-адрес. В соответствующие поля введите свободный IP-адрес, маску подсети и основной шлюз. Затем выберите пункт Использовать следующие адреса DNS-серверов. В поле предпочитаемый DNS-сервер введите IP-адрес сервера, после чего нажмите ОК (Рис.8).


Примечание! В данном руководстве, в качестве примера, был выбран свободный IP-адрес 192.168.0.104, маска подсети установлена по умолчанию 255.255.255.0, а в качестве основного шлюза выступает Wi-Fi роутер с адресом 192.168.0.1. Помните, что предпочитаемый DNS-сервер должен совпадать с введённым выше IP-адресом сервера.

Рис.8

.

II. Установка роли Active Directory Domain Services

1. Откройте окно диспетчера сервера и выберите пункт Добавить роли и компоненты (Рис.9).

Рис.9

.

2. В появившемся окне нажмите Далее (Рис.10).

Рис.10

.

3. Выберите пункт Установка ролей и компонентов, затем нажмите Далее (Рис.11).

Рис.11

.

4. Выберите сервер на который будет производиться установка роли, затем нажмите Далее (Рис.12).

Рис.12

.

5. Выберите роль Доменные службы Active Directory, на следующем этапе Мастер установки ролей предупредит, что для установки роли Доменные службы Active Directory нужно установить несколько компонентов. Нажмите Добавить компоненты (Рис.13).

Рис.13

.

6. Убедитесь, что после установки необходимых компонентов напротив Доменные службы Active Directory стоит галочка, затем нажмите Далее (Рис.14).

Рис.14

.

7. На этапе добавления компонентов оставьте все значения по умолчанию и нажмите Далее (Рис.15).

Рис.15

.

8. Ознакомьтесь с дополнительной информацией касательно Доменных служб Active Directory, затем нажмите Далее (Рис.16).

Рис.16

.

9. Для начала установки роли нажмите Установить (Рис.17).

Рис.17

.

10. После окончания установки нажмите Повысить роль этого сервера до уровня контроллера домена (Рис.18).

Рис.18

.

11. Выберите пункт Добавить новый лес, затем в поле Имя корневого домена введите имя домена (прим. в данном руководстве это example.local, Вы можете выбрать любое другое), затем нажмите Далее (Рис.19).


ВАЖНО! Домен вида .local или аналогичный можно использовать в качестве тестового, однако, он имеет ряд недостатков, а именно: 1) Вы никак не сможете подтвердить владение им для получения публичного SSL-сертификата; 2) Такое имя невозможно использовать из внешней сети; 3) Данный способ именования вступает в противоречие с глобальным DNS, так как не гарантирует его уникальность что приводит к потенциальным коллизиям.
Рекомендуется создавать согласованное пространство имен. Например имея домен lyapidov.ru (который использует сайт), домен Active Directory делать суб-доменом, например: server.lyapidov.ru. Либо использовать разные домены например lyapidov.ru — для сайта, а lyapidov.net — для Active Directory.

Рис.19

.

12. На следующем шаге предлагается выбрать функциональный уровень нового леса и корневого домена. Если вы добавляете новый лес и планируете в дальнейшем использовать серверы на базе операционной системы Windows Server 2012 R2, то можете не менять функциональный уровень леса и корневого домена. Установите галочку напротив DNS-сервер, придумайте и введите пароль для режима восстановления служб каталогов в соответствующие поля, затем нажмите Далее (Рис.20).

Рис.20

.

13. Оставьте значение NetBIOS по умолчанию и нажмите Далее (Рис.21).

Рис.21

.

14. Оставьте настройки по умолчанию и нажмите Далее (Рис.22).

Рис.22

.

15. В окне со сводной информацией по настройке сервера нажмите Далее (Рис.23).

Рис.23

.

16. Далее Мастер настройки доменных служб Active Directory проверит все ли предварительные требования соблюдены и выведет отчет. Нажмите Установить (Рис.24).

Рис.24

.

17. После того как роль вашего сервера будет повышена до уровня контроллера домена, сервер автоматически перезагрузится. Перед тем как сервер начнет перезагружаться вы увидите предупреждение (Рис.25).

Рис.25

.

18. После повышения роли сервера до уровня контроллера домена и перезагрузки — зайдите в систему под учетной записью с правами администратора домена (Рис.26).

Рис.26

.

Установка контроллера домена Active Directory в Windows Server 2012 R2 завершена!
.

Windows Server 2012 - Active DirectoryВ данной статье будет приведена подробная пошаговая инструкция по установке и настройке с нуля роли Active Directory на базе Windows Server 2012. Инструкция будет основываться на базе английской редакции. Иногда будут приводиться названия параметров и команд, аналогичные русской редакции Windows Server 2012.

Подготовка

Прежде, чем настраивать роль Active Directory необходимо произвести настройку Windows Server 2012 — задать статический IP адрес и переименовать компьютер.

Чтобы установить статический IP адрес, необходимо щелкнуть правой кнопкой мышки по иконке Network в панели задач и выбрать Open Network ang Sharing Center -> Change adapter settings. Выбрать адаптер, который смотрит во внутреннюю сеть. Properties -> Internet Protocol Version 4 (TCP/IPv4) и задать IP адрес по подобию, как приведено на картинке.

192.168.0.11 — IP адрес текущего сервера — первого контроллера домена.

192.168.0.254 — IP адрес шлюза.

Windows Server 2012 TCP IPv4  Network Adapter

Теперь необходимо переименовать имя сервера и перезагрузить его. Start -> System -> Change Settings -> Computer Name -> Change. Ввести Computer Name. В примере сервер будет называться DC1.

Windows Server 2012 Изменить имя компьютера

Итак, после предварительной настройки сервера, переходим к установки роли службы каталогов.

Start -> Server Manager (Пуск -> Диспетчер сервера).

Add roles and features -> Next

Выбрать Role-based or feature-based Installation (Установка ролей и компонентов)  -> Next

Windows Server 2012 - Добавление роли Active Directory

Выбрать сервер, на который устанавливается роль AD и нажать Далее. Select a server from the server pool -> Next

Windows Server 2012 - Добавление роли Active Directory

Выбираем роль Active Directory Domain Services (Доменные службы Active Directory), после чего появляется окно с предложением добавить роли и компоненты, необходимые для установки роли AD. Нажимаем кнопку Add Features.

Windows Server 2012 - Добавление роли Active Directory

Можно также выбрать роль DNS Server. Если вы забудете установить галочку для добавления роли DNS Server, можно особо не переживать, т.к. её можно будет добавить позже на стадии настройки роли AD.

После этого жмем каждый раз кнопку Next и устанавливаем роль.

Настройка доменных служб Active Directory

После установки роли, закрыть окно — Close. Теперь необходимо перейти к настройке роли AD.

В окне Server Manager нажать пиктограмму флага с уведомлением и нажать Promote this server to a domain controller (Повысить роль этого сервера до уровня контроллера домена) на плашке Post-deploiment Configuration.

Windows Server 2012 - Настройка роли Active Directory

Выбрать Add a new forest (Добавить новый лес), ввести название домена и нажать Далее.

Windows Server 2012 - Настройка роли Active Directory

Можете выбрать совместимость режима работы леса и корневого домена. По умолчанию устанавливается Windows Server 2012.

На этой вкладке можно будет отключить роль DNS Server. Но, в нашем случае, галочку оставляем.

Далее ввести пароль для DSRM (Directory Service Restore Mode — режим восстановления службы каталога) и нажимаем Далее.

Windows Server 2012 - Настройка роли Active Directory

На следующем шаге мастер предупреждает о том, что делегирование для этого DNS-сервера создано не было (A delegation for this DNS server cannot be created because the authoritative parent zone cannot be found or it does not run Windows DNS server. If you are integrating with an existing DNS infrastructure, you should manually create a delegation to this DNS server in the parent zone to ensure reliable name resolution from outside the domain «ithz.ru». Otherwise, no action is required.).

Нажимаем Next.

Windows Server 2012 - Настройка роли Active Directory

На следующем шаге можно изменить NetBIOS имя, которое было присвоено домену. Мы этого делать не будем. Просто нажимаем Далее.

Windows Server 2012 - Настройка роли Active Directory

На следующем шаге можно изменить пути к каталогам базы данных AD DS (Active Directory Domain Services – доменная служба Active Directory), файлам журнала, а так же папке SYSVOL. Мы менять ничего не будем. Нажимаем кнопку Далее.

Windows Server 2012 - Настройка роли Active Directory

На следующем шаге отображается сводная информация по настройке. Нажав кнопку View Script, можно посмотреть Powershell скрипт, который произведет настройку доменных служб Active Directory.

# Windows PowerShell script for AD DS Deployment

Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:WindowsNTDS" `
-DomainMode "Win2012" `
-DomainName "ithz.ru" `
-DomainNetbiosName "ITME" `
-ForestMode "Win2012" `
-InstallDns:$true `
-LogPath "C:WindowsNTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:WindowsSYSVOL" `
-Force:$true

Убедившись, что все указано верно, нажимаем на кнопку Next.

На следующем шаге производится проверка, все ли предварительные требования соблюдены. После чего покажет нам отчёт. Одно из обязательных требований — это установленный пароль локального администратора. В самом низу можно прочитать предупреждение о том, что после того, как будет нажата кнопка Install уровень сервера будет повышен до контроллера домена и будет произведена автоматическая перезагрузка.

Должна появиться надпись  All prerequisite checks are passed successfully. Click «install» to begin installation.

Нажимаем кнопку Install.

Srv2012-Add-role-AD-11

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

На этом базовая настройка служб каталога Active Directory завершена. Конечно же еще предстоит проделать огромный объем работы по созданию подразделений, созданию новых пользователей, настройке групповых политик безопасности, …

Дополнительная информация по статье

Прощай dcpromo, привет Powershell

Из анонсов все уже знают, что утилита dcpromo устарела. Если запустить в командной строке dcpromo, то появится окно с предупреждением, предлагающее вам воспользоваться Диспетчером сервера.

The Active Directory Services installation Wizard is relocated in Server Manager.

Windows Server 2012 - ошибка при запуске dcpromo

Тем не менее, данной командой можно воспользоваться c указанием параметра автоматической настройки — dcpromo /unattend. При работе сервера в режиме Core, предупреждения не будет, а в командной строке появится информация по использованию утилиты dcpromo.

Все эти изменения связаны с тем, что в Windows Server 2012 сделали акцент на администрирование с помощью Powershell.

Компоненты, связанные с Active Directory, удаленны из Windows Server 2012

Службы федерации Active Directory (AD FS)

  • Больше не поддерживаются приложения, использующие веб-агенты «в режиме маркеров NT». Эти приложения должны переноситься на платформу Windows Identity Foundation и использовать службу Claims to Windows Token для преобразования имени участника-пользователя из маркера SAML в маркер Windows для использования в приложении.
  • Больше не поддерживаются «Группы ресурсов» (описание групп ресурсов см. по адресу http://technet.microsoft.com/library/cc753670(WS.10).aspx)
  • Больше не поддерживается возможность использования служб Active Directory облегченного доступа к каталогам (AD LDS) в качестве хранилища результатов проверки подлинности.
  • Необходим переход к версии AD FS в Windows Server 2012. Не поддерживается обновление «на месте» с AD FS 1.0 или со «стандартной» версии AD FS 2.0.

Поставщики WMI

Обновлено Обновлено: 02.10.2022
Опубликовано Опубликовано: 01.10.2016

Что такое Active Directory простыми словами.

Подготовка системы
Установка роли AD
Повышение сервера до контроллера домена
Дополнительные настройки
Поиск ошибок в работе AD

1. Подготовка системы

Для контроллера домена необходимо заранее задать имя компьютера и настроить статический IP-адрес. Это важно, так как смена этих настроек на рабочем активном каталоге может привести к потери работоспособности системы.

Проверяем настройку системного времени и часового пояса. Данный параметр также важен для устанавливаемой роли.

2. Установка роли AD DS

Открываем Диспетчер серверов

Нажимаем по диспетчеру серверов

Нажимаем Управление — Добавить роли и компоненты:

Кликаем по добавлению ролей и компонентов

Если откроется окно с приветствием, просто нажимаем Далее. В следующем окне оставляем Установка ролей и компонентов и нажимаем Далее:

Выбор установки ролей и компонентов сервера Windows 2012

Выбираем сервер, на который будет установлена роль контроллера домена (по умолчанию выбран локальный сервер) и нажимаем Далее:

Среди всех ролей выбираем следующие:

  • DHCP-сервер
  • DNS-сервер
  • Доменные службы Active Directory

Выбор ролей для установки контроллера домена

* на самом деле, для работы роли контроллера домена не обязательна установка первых двух. Они могут быть настроены на других серверах.

В следующем окне Выбор компонентов просто нажимаем Далее.

Досчелкиваем Далее до конца и нажимаем Установить:

Начинаем установку роли AD DS

Те же действия можно выполнить командой Powershell:

Install-WindowsFeature -Name DNS, DHCP, AD-Domain-Services -IncludeManagementTools

После завершения установки роли не торопимся закрывать окно. Кликаем по пункту меню Повысить роль этого сервера до уровня контроллера домена:

Кликаем по повышению роли сервера до контроллера домена

* если мы перезагрузим сервер, повысить роль можно вернувшись в диспетчер серверов.

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

Добавляем новый лес для контроллера и вводим его название

В следующем окне оставляем все как есть и вводим надежный пароль для режима восстановления:

Вводим пароль для режима восстановления контроллера домена

В окне Параметры DNS нажимаем Далее.

В окне Дополнительные параметры автоматически будет подобрано имя NetBIOS. Его менять не обязательно — просто нажимаем Далее:

Настройка NetBIOS

В окне Пути стоит оставить все, как есть. Нажимаем Далее. В окне Просмотреть параметры проверяем правильность введенных данных и нажимаем Далее.

Начнется проверка системы на соответствие требованиям. Если ошибок не будет, активируется кнопка Установить. Прочитайте все предупреждения, нажмите на данную кнопку и дождитесь окончания повышения сервера до контроллера домена. Сервер будет перезагружен, а после перезагрузки станет контроллером.

Настройка после развертывания сервиса

После развертывания контроллера домера, выполняем следующие действия.

Синхронизация времени

На контроллере домена с ролью PDC Emulator необходимо настроить источник синхронизации времени. Для этого открываем командную строку от администратора и вводим команду:

w32tm /config /manualpeerlist:»time.nist.gov,0x8 time.windows.com,0x8″ /syncfromflags:manual /reliable:yes /update

* данная команда задаст в качестве источника времени 2 сервера — time.nist.gov и time.windows.com.
* если мы не знаем, на каком контроллере у нас роль PDC Emulator, воспользуемся инструкцией Управление FSMO через powershell.

Соответствие рекомендациям Best Practice

1. Создание коротких имен файлов должно быть отключено

Ранее в DOS все файлы называли в формате 8.3 — 8 символов под имя, 3 для расширения. Необходимость такого подхода сильно устарело, однако по умолчанию для обеспечения совместимости может быть включено.

В командной строке от имени администратора вводим:

fsutil 8dot3name set 1

Готово — поддержка создания коротких имен отключено.

2. Файл Srv.sys должен быть настроен на запуск по требованию.

В обычной командной строке от имени администратора вводим:

sc config srv start= demand

3. Некоторые сетевые адаптеры поддерживают RSS, но эта возможность отключена.

Необходимо для сетевого адаптера, который используется для подключения к сети, включить RSS.

Вводим команду в Powershell:

Enable-NetAdapterRss -Name *

4. Некоторые сетевые адаптеры поддерживают IPsec TOv2, но эта возможность отключена.

Вводим команду в Powershell:

Enable-NetAdapterIPsecOffload -Name *

5. Некоторые сетевые адаптеры поддерживают LSO, но эта возможность отключена.

Вводим команду в Powershell:

Enable-NetAdapterLso -Name *

6. Значение … не соответствует рекомендуемому на этом сервере.

Система может предложить более оптимальные параметры для опций:

  • Smb2CreditsMin — 128.
  • Smb2CreditsMax — 2048.
  • DurableHandleV2TimeoutInSeconds — 30.
  • AutoDisconnectTimeout — 0.
  • CachedOpenLimit — 5.
  • AsynchronousCredits — 64.

Выставить данные опции можно командой Set-SmbServerConfiguration:

Set-SmbServerConfiguration -Smb2CreditsMin 128 -Smb2CreditsMax 2048 -DurableHandleV2TimeoutInSeconds 30 -AutoDisconnectTimeout 0 -CachedOpenLimit 5 -AsynchronousCredits 64 -Confirm:$false

Настройка DNS

Как правило, на один сервер с ролью контроллера домена устанавливается DNS. В этом случае необходимо выполнить ряд действий.

1. Настройка перенаправления.

Если наш сервер DNS не может ответить на запрос, он должен передавать его на внешний сервер. Для настройки перенаправления открываем консоль управления сервером имен и кликаем правой кнопкой по названию сервера — выбираем Свойства:

Заходим в свойства сервера DNS

Переходим на вкладку Сервер пересылки:

Переходим на вкладку Сервер пересылки

Кликаем по кнопке Изменить:

Изменяем серверы пересылки

Вводим адреса серверов, на которые хотим переводить запросы:

Вводим новые серверы для пересылки

* это могут быть любые DNS, например, глобальные от Google или Яндекса, а также серверы от Интернет-провайдера.

2. Удаление корневых ссылок

Если наш сервер не работает по Ipv6, стоит удалить корневые ссылки, которые работают по этой адресации. Для этого заходим в свойства нашего сервера DNS:

Заходим в свойства сервера DNS

Переходим во вкладку Корневые ссылки:

Переходим на вкладку Корневые ссылки

Мы увидим список серверов имен — удаляем все с адресами IPv6.

3. Включение очистки

Чтобы в DNS не хранилось много ненужных записей, настраиваем автоматическую читску. Для этого открываем настройки сервера имен:

Заходим в свойства сервера DNS

Переходим на вкладку Дополнительно:

Переходим на вкладку Дополнительно

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

Включаем чистку устаревших записей DNS

Готово.

Проверка корректности работы AD

После выполнения всех процедур по настройке сервера, ждем около 15 минут. После открываем командную строку от администратора и вводим:

dcdiag /a /q

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


Download Article


Download Article

In most corporate environments, to accomplish certain tasks inexpensively and quickly, you need a domain. You can configure a Windows Server 2012 R2 server to host a domain, and when the configuration completes, the server is called a domain controller. A domain controller serves many purposes, but is used primarily for user logon management, organization through security groups, and centralized management of policies and properties on computers throughout a network. Use this guide to start on your path towards simplifying control of your network!

  1. Image titled Create a Windows Server 2012 R2 Domain Step 1

    1

    Add Roles and Features.

    • Boot your Windows 2012 R2 server, if it is not running.
    • Log on to the server when it completes booting.
    • Notice that Server Manager is displayed upon a successful login when using an administrator account at the initial logon prompt.
    • Click Add Roles and Features to display the Add Roles and Features Wizard. This wizard helps you easily manage roles, role services, and features.
    • Verify you have completed the requirements for the role to be installed.
    • Click Next to display Select Installation Type.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 2

    2

    Review Select Installation Type options.

    • Note that this is a role-based and feature-based installation.
    • Click Next to display Select destination server.

    Advertisement

  3. Image titled Create a Windows Server 2012 R2 Domain Step 3

    3

    Choose a Destination Server.

    • Note that this selection lets you select the server on which you want to do the installation. In this example there is only one server, so there is only one option.
    • Click Next to display the Server Role and Feature Wizard so you can make a server role selection.
  4. Image titled Create a Windows Server 2012 R2 Domain Step 4

    4

    Select roles.

    • Note that you can highlight a name in the center pane so that you can read the description in the right pane.
    • Click the checkbox next to Active Directory Domain Service.
    • Click Next to display Add Roles and Features.
  5. Image titled Create a Windows Server 2012 R2 Domain Step 5

    5

    Select features.

    • Observe the popup informing you that in order for Active Directory Domain Service to be installed, additional features, not already on the machine, need to be installed.
    • Click Add Features, the popup disappears, and you are shown the Active Directory Domain Service checkbox checked.
    • Click Next to display a list of features that you can add.
    • Note that in this step no additional selections are needed.
    • Click Next to display a screen that gives an overview of Active Directory Domain Service.
    • Click Next to display the Confirmation installation selections.
  6. Image titled Create a Windows Server 2012 R2 Domain Step 6

    6

    Review the Confirmation installation selections.

    • Use the confirmation window to review your choices, then hit continue to accept the selection.
    • Click install.
    • Keep all windows open.
    • Move on to creating your domain, and keep learning.
  7. Advertisement

When the domain creation is complete, the Windows Server 2012 R2 computer is made the domain controller.

  1. Image titled Create a Windows Server 2012 R2 Domain Step 7

    1

    Verify Active Directory Domain Service is installed.

    • Take note of the blue progress bar, and beneath it, you are reminded that Additional steps are required to make this machine a domain controller.
    • Move your mouse and hover over the blue progress bar to see when installation is 100% complete.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 8

    2

    Promote server.

    • Observe that at this point, only the Active Directory Domain Service is installed. In other words, the server is not yet a domain controller.
    • Note the link, in blue, Promote this server to a domain controller.
    • Click Promote this server to a domain controller to display the Active Directory Domain Services Configuration Wizard.
    • Notice under Select the deployment operation are three radio buttons; please review them, because they are very different.
    • Click Add a new forest.
    • Type your desired domain name under Specify the domain information for this operation, and to the right of Root domain name.
    • Click Next to display Active Directory Domain Services Wizard.
  3. Image titled Create a Windows Server 2012 R2 Domain Step 9

    3

    Configure domain controller options.

    • Notice that these are options, which means you are not required to install any.
    • Notice that even though DNS is selected you can un-check it, since it is optional, but that is possible only if you have another DNS server in your domain. Since a DNS server does not exist yet in your domain you must leave it checked.
    • Click the box under Type the Directory Service Restore Mode (DSRM) password.
    • Type the restore password you desire. Don’t forget it!
    • Click Next to display DNS options.
  4. Image titled Create a Windows Server 2012 R2 Domain Step 10

    4

    Configure name service options.

    • Notice that the message in the yellow box is informing you that a domain could not be found with which to associate; the reason is because your domain is the first domain in the forest.
    • Click Next to display additional name options.
    • Notice that the wizard lets you select more options.
    • Click Next to display Active Directory configuration settings.
  5. Image titled Create a Windows Server 2012 R2 Domain Step 11

    5

    Configure the path name.

    • Notice the default location for saving active directory files, which you can accept or modify where Active Directory configuration will be stored.
    • Click Next to accept the default location and display the options you have selected.
  6. Image titled Create a Windows Server 2012 R2 Domain Step 12

    6

    Review the selection.

    • Review the selected options.
    • Click Next to begin the installation prerequisite check.
  7. Image titled Create a Windows Server 2012 R2 Domain Step 13

    7

    Install the selection.

    • Observe the green circle and the white check mark.
    • Click Install to begin installing the options you have selected.
    • Note that at this point the installation process goes through several displays, including reboot followed by the sign in prompt.
    • Keep all windows open.
    • Continue to Part 3, and keep learning.
  8. Advertisement

  1. Image titled Create a Windows Server 2012 R2 Domain Step 14

    1

    Execute Ctrl+Alt+Delete

    • Notice that the sign in prompt is an indication that the installation is complete.
    • Issue Ctrl+Alt+Delete to display yourdomainnamehereAdministrator, which is requesting the Administrator password.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 15

    2

    Log on to the domain.

    • Notice that you are about to logon to the domain, and not the server, and that only the account Administrator can logon using the domain controller console logon prompt.
    • Observe that this prompt means you are logging on to your domain using the user account Administrator and its password.
    • Type the password for Administrator and click the arrow to display Server Manager, if logon is successful.
    • Continue to Part 4, Create domain memberships, and keep learning.
  3. Advertisement

At this point you are ready to make other configuration changes to test the functionality of your domain; one way to test is by creating memberships with other computers; these computers may have Windows server or Windows client operating system installed.

  1. Image titled Create a Windows Server 2012 R2 Domain Step 16

    1

    Verify connectivity.

    • Take note that in this example you will configure membership using Windows 7, but you can use any other Windows machine.
    • Boot a Windows 7 machine, if it is not up.
    • Logon.
    • Verify that your Windows 7 machine and your Windows 2012 R2 server can ping each other by IP address.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 17

    2

    Join your Windows 7 computer to the domain.

    • Go to Control Panel on your Windows 7 computer.
    • Click System to display basic information about your computer.
    • Click Advanced system settings to display System Properties.
    • Click Computer Name.
    • Click Change to display Computer Name/Domain Changes.
    • Click the radio button next to Domain, Under Member of.
    • Type yourdomainnamehere. (Ex. kim.local)
    • Click OK to display User name and Password prompt; note that this is the administrator account on the domain controller.
    • Note that Administrator is the only account that has authorization to add a computer to the domain.
    • Type Administrator into the username field and use the password you’ve created.
    • Click OK.
    • Note that shortly after you will see a popup welcoming you to your domain.
    • Click OK and you are prompted to restart the client.
  3. Image titled Create a Windows Server 2012 R2 Domain Step 18

    3

    Logon the domain.

    • Click OK to return to System Properties.
    • Click Close and you are prompted to Restart Now or Restart Later
    • Click Restart Now to restart the client.
    • Issue Ctrl+Alt+Delete, after the restart, to display the logon prompt.
    • Notice that you can logon to the local computer with your normal Windows 7 user account. However, if that same account tries to logon to the domain, it will fail, for two reasons:
      • Because so far only one domain user, Administrator, has been configured.
      • Your Windows 7 local users is not a member of your domain.
    • Click Switch User to display Select a user for logon, so you can logon as Administrator.
    • Click Other User to display the domain logon prompt.
    • Notice that under Password, Logon to: yourdomainnamehere displays; informing you that you are about to logon with a domain logon and not a local logon.
    • Type Administrator into the username field and use the password you’ve created.
    • You are now logged on to the domain, not your local Windows 7 computer.
  4. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

  • You are highly encouraged to change the name and set a static IP address on your Windows 2012 R2 server prior to using this guide.

  • If the domain logon fails, make sure you are typing yourdomainnamehereAdministrator instead of just Administrator.

  • If you mistakenly closed the Installation progress display, click the yellow triangle to the left of Manage in Server Manager, so you can Promote this server to a domain controller.

Show More Tips

Thanks for submitting a tip for review!

Advertisement

  • Before you join the client to the domain be sure that the

    • Machines can ping each other by IP address
    • Client can ping the domain name

Advertisement

Things You’ll Need

  • Windows computer, such as Windows 7 or 8.1.
  • Windows 2012 R2 server.

References

  1. Microsoft. (2014, March 5). Server Roles and Technologies in Windows Server 2012 R2 and Windows Server 2012. Retrieved from TechNet: https://technet.microsoft.com/library/hh831669.aspx

About This Article

Thanks to all authors for creating a page that has been read 28,761 times.

Is this article up to date?


Download Article


Download Article

In most corporate environments, to accomplish certain tasks inexpensively and quickly, you need a domain. You can configure a Windows Server 2012 R2 server to host a domain, and when the configuration completes, the server is called a domain controller. A domain controller serves many purposes, but is used primarily for user logon management, organization through security groups, and centralized management of policies and properties on computers throughout a network. Use this guide to start on your path towards simplifying control of your network!

  1. Image titled Create a Windows Server 2012 R2 Domain Step 1

    1

    Add Roles and Features.

    • Boot your Windows 2012 R2 server, if it is not running.
    • Log on to the server when it completes booting.
    • Notice that Server Manager is displayed upon a successful login when using an administrator account at the initial logon prompt.
    • Click Add Roles and Features to display the Add Roles and Features Wizard. This wizard helps you easily manage roles, role services, and features.
    • Verify you have completed the requirements for the role to be installed.
    • Click Next to display Select Installation Type.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 2

    2

    Review Select Installation Type options.

    • Note that this is a role-based and feature-based installation.
    • Click Next to display Select destination server.

    Advertisement

  3. Image titled Create a Windows Server 2012 R2 Domain Step 3

    3

    Choose a Destination Server.

    • Note that this selection lets you select the server on which you want to do the installation. In this example there is only one server, so there is only one option.
    • Click Next to display the Server Role and Feature Wizard so you can make a server role selection.
  4. Image titled Create a Windows Server 2012 R2 Domain Step 4

    4

    Select roles.

    • Note that you can highlight a name in the center pane so that you can read the description in the right pane.
    • Click the checkbox next to Active Directory Domain Service.
    • Click Next to display Add Roles and Features.
  5. Image titled Create a Windows Server 2012 R2 Domain Step 5

    5

    Select features.

    • Observe the popup informing you that in order for Active Directory Domain Service to be installed, additional features, not already on the machine, need to be installed.
    • Click Add Features, the popup disappears, and you are shown the Active Directory Domain Service checkbox checked.
    • Click Next to display a list of features that you can add.
    • Note that in this step no additional selections are needed.
    • Click Next to display a screen that gives an overview of Active Directory Domain Service.
    • Click Next to display the Confirmation installation selections.
  6. Image titled Create a Windows Server 2012 R2 Domain Step 6

    6

    Review the Confirmation installation selections.

    • Use the confirmation window to review your choices, then hit continue to accept the selection.
    • Click install.
    • Keep all windows open.
    • Move on to creating your domain, and keep learning.
  7. Advertisement

When the domain creation is complete, the Windows Server 2012 R2 computer is made the domain controller.

  1. Image titled Create a Windows Server 2012 R2 Domain Step 7

    1

    Verify Active Directory Domain Service is installed.

    • Take note of the blue progress bar, and beneath it, you are reminded that Additional steps are required to make this machine a domain controller.
    • Move your mouse and hover over the blue progress bar to see when installation is 100% complete.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 8

    2

    Promote server.

    • Observe that at this point, only the Active Directory Domain Service is installed. In other words, the server is not yet a domain controller.
    • Note the link, in blue, Promote this server to a domain controller.
    • Click Promote this server to a domain controller to display the Active Directory Domain Services Configuration Wizard.
    • Notice under Select the deployment operation are three radio buttons; please review them, because they are very different.
    • Click Add a new forest.
    • Type your desired domain name under Specify the domain information for this operation, and to the right of Root domain name.
    • Click Next to display Active Directory Domain Services Wizard.
  3. Image titled Create a Windows Server 2012 R2 Domain Step 9

    3

    Configure domain controller options.

    • Notice that these are options, which means you are not required to install any.
    • Notice that even though DNS is selected you can un-check it, since it is optional, but that is possible only if you have another DNS server in your domain. Since a DNS server does not exist yet in your domain you must leave it checked.
    • Click the box under Type the Directory Service Restore Mode (DSRM) password.
    • Type the restore password you desire. Don’t forget it!
    • Click Next to display DNS options.
  4. Image titled Create a Windows Server 2012 R2 Domain Step 10

    4

    Configure name service options.

    • Notice that the message in the yellow box is informing you that a domain could not be found with which to associate; the reason is because your domain is the first domain in the forest.
    • Click Next to display additional name options.
    • Notice that the wizard lets you select more options.
    • Click Next to display Active Directory configuration settings.
  5. Image titled Create a Windows Server 2012 R2 Domain Step 11

    5

    Configure the path name.

    • Notice the default location for saving active directory files, which you can accept or modify where Active Directory configuration will be stored.
    • Click Next to accept the default location and display the options you have selected.
  6. Image titled Create a Windows Server 2012 R2 Domain Step 12

    6

    Review the selection.

    • Review the selected options.
    • Click Next to begin the installation prerequisite check.
  7. Image titled Create a Windows Server 2012 R2 Domain Step 13

    7

    Install the selection.

    • Observe the green circle and the white check mark.
    • Click Install to begin installing the options you have selected.
    • Note that at this point the installation process goes through several displays, including reboot followed by the sign in prompt.
    • Keep all windows open.
    • Continue to Part 3, and keep learning.
  8. Advertisement

  1. Image titled Create a Windows Server 2012 R2 Domain Step 14

    1

    Execute Ctrl+Alt+Delete

    • Notice that the sign in prompt is an indication that the installation is complete.
    • Issue Ctrl+Alt+Delete to display yourdomainnamehereAdministrator, which is requesting the Administrator password.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 15

    2

    Log on to the domain.

    • Notice that you are about to logon to the domain, and not the server, and that only the account Administrator can logon using the domain controller console logon prompt.
    • Observe that this prompt means you are logging on to your domain using the user account Administrator and its password.
    • Type the password for Administrator and click the arrow to display Server Manager, if logon is successful.
    • Continue to Part 4, Create domain memberships, and keep learning.
  3. Advertisement

At this point you are ready to make other configuration changes to test the functionality of your domain; one way to test is by creating memberships with other computers; these computers may have Windows server or Windows client operating system installed.

  1. Image titled Create a Windows Server 2012 R2 Domain Step 16

    1

    Verify connectivity.

    • Take note that in this example you will configure membership using Windows 7, but you can use any other Windows machine.
    • Boot a Windows 7 machine, if it is not up.
    • Logon.
    • Verify that your Windows 7 machine and your Windows 2012 R2 server can ping each other by IP address.
  2. Image titled Create a Windows Server 2012 R2 Domain Step 17

    2

    Join your Windows 7 computer to the domain.

    • Go to Control Panel on your Windows 7 computer.
    • Click System to display basic information about your computer.
    • Click Advanced system settings to display System Properties.
    • Click Computer Name.
    • Click Change to display Computer Name/Domain Changes.
    • Click the radio button next to Domain, Under Member of.
    • Type yourdomainnamehere. (Ex. kim.local)
    • Click OK to display User name and Password prompt; note that this is the administrator account on the domain controller.
    • Note that Administrator is the only account that has authorization to add a computer to the domain.
    • Type Administrator into the username field and use the password you’ve created.
    • Click OK.
    • Note that shortly after you will see a popup welcoming you to your domain.
    • Click OK and you are prompted to restart the client.
  3. Image titled Create a Windows Server 2012 R2 Domain Step 18

    3

    Logon the domain.

    • Click OK to return to System Properties.
    • Click Close and you are prompted to Restart Now or Restart Later
    • Click Restart Now to restart the client.
    • Issue Ctrl+Alt+Delete, after the restart, to display the logon prompt.
    • Notice that you can logon to the local computer with your normal Windows 7 user account. However, if that same account tries to logon to the domain, it will fail, for two reasons:
      • Because so far only one domain user, Administrator, has been configured.
      • Your Windows 7 local users is not a member of your domain.
    • Click Switch User to display Select a user for logon, so you can logon as Administrator.
    • Click Other User to display the domain logon prompt.
    • Notice that under Password, Logon to: yourdomainnamehere displays; informing you that you are about to logon with a domain logon and not a local logon.
    • Type Administrator into the username field and use the password you’ve created.
    • You are now logged on to the domain, not your local Windows 7 computer.
  4. Advertisement

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

  • You are highly encouraged to change the name and set a static IP address on your Windows 2012 R2 server prior to using this guide.

  • If the domain logon fails, make sure you are typing yourdomainnamehereAdministrator instead of just Administrator.

  • If you mistakenly closed the Installation progress display, click the yellow triangle to the left of Manage in Server Manager, so you can Promote this server to a domain controller.

Show More Tips

Thanks for submitting a tip for review!

Advertisement

  • Before you join the client to the domain be sure that the

    • Machines can ping each other by IP address
    • Client can ping the domain name

Advertisement

Things You’ll Need

  • Windows computer, such as Windows 7 or 8.1.
  • Windows 2012 R2 server.

References

  1. Microsoft. (2014, March 5). Server Roles and Technologies in Windows Server 2012 R2 and Windows Server 2012. Retrieved from TechNet: https://technet.microsoft.com/library/hh831669.aspx

About This Article

Thanks to all authors for creating a page that has been read 28,761 times.

Is this article up to date?

Active Directory in Windows Server 2012 R2

If you are already familiar to the process of promoting a server to domain controller, you would be surprised to know that DCPROMO (legacy domain controller promotion) tool is now deprecated in Windows Server 2012 and above. Now you can do this using Server Manager or via Windows PowerShell. Another important fact I would like to mention is that the PowerShell remoting is enabled by default in Windows Server 2012. So, you can now use PowerShell remoting to start Active Directory Domain Services (AD DS) deployment process right from one server and without logging into other remote servers.

I will show you how to install active directory domain services using Server Manager GUI as well as using PowerShell. Remember that if you come across to a server core installation which do not have GUI installed, you have to complete the whole process using Windows PowerShell.

Active Directory Deployment using Server Manager GUI

To deploy the first Windows Server 2012 or Windows Server 2012 R2 domain controller in a new forest, you can run Windows PowerShell commands directly on the server by either logging on locally to the server or by using Remote Desktop. Another option is to use Windows PowerShell remoting, which enables you to run Windows PowerShell commandlets (cmdlets)  on one or more remote computers simultaneously by using the WS-Management protocol. In this section, I am going to show you the process using Server Manager.

Before starting, configure the static IP address and DNS address on each server. Make sure all of your Servers which you are going to promote to domain controllers can communicate (ping) each other. You may need to modify the Windows firewall on your servers.

Best Practices for DNS settings on Domain Controllers

  1. In single DC/DNS in a domain environment,  DC/DNS server must point to its private IP address (not to loopback 127.x.x.) as preferred DNS server in TCP/IP property.
  2. If multiple DCs/DNS servers are in a domain environment, recommendation to have all DCs point to their own private IP address in preferred DNS server field and other DNS server in alternate DNS server field. Add 127.0.0.1 (loopback) as tertiary DNS server entry (in Advanced settings).
  3. Each DC must have one IP address and one network adapter is enabled (disable unused NICs).
  4. IPv6 should not be disabled on DC’s NIC card. Set it to “obtain IPV6 address automatically” and “obtain DNS server address automatically”
  5. If multiple NICs (enabled and disabled) are present on server, make sure the active NIC should be on top in NIC binding.
  6. Contact your ISP and get valid DNS IPs from them and add it in to the forwarders, Do not set public DNS server in TCP/IP settings of DC.

Once the above settings are done and all servers can ping each other, you begin the deployment process. Follow the steps shown below to install Active Directory in Windows Server 2012 R2:

  • Open Server Manager.
  • Click Manage drop-down and then select Add Roles and Features option as shown below.

Add Roles & Features Screen

Add Roles & Features Screen
  • Press Next on welcome screen and select Role-based or feature-based installation under Installation Type screen and then click Next.

Role-based or Feature-based Install

Role-based or Feature-based Install
  • Select a server from pool. Make sure the server you want to promote is selected then click Next.

Select a Server from pool

Select a Server from pool
  • Select the checkbox in front of Active Directory Domain Services. As soon as you select this option, you will be prompted with Add features that are required by AD DS. Simply click Add Features button as shown below.

Select Role and required Features

  • Press Next and then click Install to begin the installation of Active Directory Domain Services binaries. Once the installation is complete, click Close button.AD DS Install Finish
  • Once the process is complete, you will be asked for Post deployment configuration by Server Manager. Look at the top right side of Server Manager, you will see yellow triangle near to Flag icon indicating unread notification. Click on the notification and select the option Promote this server to a domain controller.

Post Deployment Configuration

Post Deployment Configuration
  • Once you click at the option ‘Promote this server to a domain controller’, you will see Active Directory Domain Services Configuration Wizard. Now, select one option depending upon your environment. At this stage I assume that you are creating a new AD Forest. So, this server is going to be your first domain controller of first domain in the new forest.  Enter the name of your Root domain and click Next. See the diagram below:

Add New Active Directory Forest

Add New Active Directory Forest
  • In this screen you have to select domain controller options like Forest and Domain Functional Level. You also need to specify whether to install DNS service on this server. The Directory Service Restore Mode (DSRM) password is also entered here. This password will be used when you want to start the server in Active Directory Restore Mode for Recovery operations. Notice that the Global Catalog (GC) and Read Only Domain Controller (RODC) options are greyed since this is a first domain controller in this new forest. So, It must be a Global Catalog and it can not be a RODC at first place.

Domain Controller Options

Domain Controller Options
  • Press Next and you will be asked to enter the netBIOS name for this server. Leave it default and press Next.

NetBIOS Name

NetBIOS Name
  • Note that if you are adding domain controller to existing domain, you will see Install from Media (IFM) or Replicate from existing domain controllers options at next screen. Install from Media is the option which helps you save your network bandwidth if you are adding a new domain controller to existing domain. Because replication traffic can be huge depending upon the Active Directory infrastructure size, and if you are using slow network link between this server and other domain controllers, it will be a good idea to choose Install from Media option. You can use the Ntdsutil.exe tool to create installation media for additional domain controllers that you are creating in a domain. By using the Install from Media (IFM) option, you can minimize the replication of directory data over the network. In this screen, you can also select a particular domain controller to replicate the data from.

Install From Media or Replication

Install From Media or Replication

If you are creating a new Forest, you will not see the above options.

  •  In the next screen, you will have to choose the location of active directory database, log files and sysvol folders. After selecting the location, press Next.

Location of database, log files and sysvol

Location of database, log files and sysvol
  • Now  the server will verify the prerequisites needed for active directory domain services. Once this is completed, press Install button to begin the install operation.
  • Restart the server after the installation completes.

Active Directory Deployment using Windows PowerShell

This topic explains how to accomplish common server configuration tasks, such as changing computer name, configuring network properties and promoting the server to a domain controller while the server is in Server Core mode where you do not have any GUI or if you want to do everything using command-line interface.

Change Computer Name

When you install Windows Server 2012 R2 on any system, by default the computer name is set randomly. To change the computer name, you can use the following PowerShell command.

PS C:>Rename-Computer -NewName DC1 -Restart

You should know that promoting a server to domain controller need a static IP address configured on server. Active Directory will not work when the server is set to obtain IP address automatically from DHCP. So, the first step is to set static IP address.

Set a Static IP address

  1. In Windows PowerShell, run Get-NetIPInterface cmdlet.

  2. Make a note of the number shown in the IfIndex column of the output for your IP interface or the InterfaceAlias string. If your computer has more than one network adapter, make a note of the number or string corresponding to the interface for which you wish to set a static IP address. See the Figure below:

    Get-NetIPInterfaceIn this Figure, IfIndex is 12 for which we will set the IP address.

  3. In Windows PowerShell, run the command New-NetIPAddress –InterfaceIndex 12 –IPAddress -192.168.10.10 –PrefixLength 24 –DefaultGateway -192.192.168.10.1

    Where:

    InterfaceIndex is the value of IfIndex from Step 2 (in this example, 12).

    IPAddress is the static IP address you intend to set (in this example, 192.168.10.10).

    PrefixLength is the prefix length (another form of subnet mask) for the IP address you intend to set (in this example, 24).

    DefaultGateway is the default gateway (in this example, 192.168.10.1).

  4. In Windows PowerShell, run the command Set-DNSClientServerAddress –InterfaceIndex 12 -ServerAddresses 192.168.10.10,192.168.10.11

    Where:

    InterfaceIndex is the value of IfIndex from Step 2 (In this example, 12).

    ServerAddresses is the IP address of your DNS server. You can enter multiple addresses separated by comma.

    New-NetIPAddress

If you need to switch to using DHCP, use the Windows PowerShell command: Set-DnsClientServerAddress –InterfaceIndex 12 –ResetServerAddresses

Setup Windows PowerShell Remoting

As I have already mentioned that you can install active directory domain services on local computer or on remote computer using Windows PowerShell without the need to login into the remote computer. Windows Server 2012 has PowerShell remoting enabled by default.

Windows PowerShell remoting is primarily intended for remotely managing domain-joined computers, and if you are preparing to deploy the first domain controller in a new forest there is no domain to join yet. In other words, the remote server that will be promoted to a domain controller is initially in a workgroup, not a domain. In addition, the local computer from which you will be performing the deployment might also be in a workgroup. If you try to run any command on remote server, you will get the error as shown below:

PS C:> Get-WindowsFeature -ComputerName DELDC2
Get-WindowsFeature : WinRM cannot process the request. The following error occurred while using Kerberos authentication: Cannot find the computer DELDC2. Verify that the computer exists on the network and that the name provided is spelled correctly.
At line:1 char:1
+ Get-WindowsFeature -ComputerName DELDC2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo     : DeviceError: (Microsoft.Manag...rDetailsHandle):CimException) [Get-WindowsFeature], Exception
  + FullyQualifiedErrorId :  UnSupportedTargetDevice,Microsoft.Windows.ServerManager.Commands.GetWindowsFeatureCommand

Notice that the error message says Error occurred while using Kerberos authentication. This is because by default WS-Man protocol uses Kerberos authentication. Since all the Servers are yet in workgroup environment; the Kerberos is not supported.

In this situation, you need to enable the two stand-alone computers to talk to each other using the WS-Management protocol. If the computer from which you are performing the deployment is also running Windows Server 2012 or Windows Server 2012 R2, you just need to add the name of the remote server to the TrustedHosts list in the local computer’s WinRM configuration. Doing this enables the local computer to connect to the remote server using NTLM as the authentication mechanism instead of Kerberos, which is used in domain-based environments.

I am currently on server DELDC1 and I have other 3 servers named DELDC2, MUMDC1 and MUMDC2. By default, the TrustedHosts list is empty on every server. So, it does not allow commands to any remote computer which is not in domain.

PS C:> Get-Item WSMan:\localhostclientTrustedHosts

   WSManConfig: Microsoft.WSMan.ManagementWSMan::localhostClient

Type            Name                           SourceOfValue   Value
----            ----                           -------------   -----
System.String   TrustedHosts

Now, I will add the 3 servers to TrsutedHosts list using Set-Item cmdlet as shown below:

PS C:> Set-Item WSMan:\localhostclientTrustedHosts -Value DELDC2 -Concatenate -Force
PS C:> Set-Item WSMan:\localhostclientTrustedHosts -Value MUMDC1 -Concatenate -Force
PS C:> Set-Item WSMan:\localhostclientTrustedHosts -Value MUMDC2 -Concatenate -Force

Note that the –Concatenate parameter is mandatory, otherwise every time you run the Set-Item command, it will keep overwriting the old values in TrustedHosts list. The -force parameter is however optional, which is used to suppress the confirmation (Yes/No) prompt. Now, take a look on TrustedHosts list again.

PS C:> Get-Item WSMan:\localhostclientTrustedHosts

   WSManConfig: Microsoft.WSMan.ManagementWSMan::localhostClient

Type            Name                           SourceOfValue   Value
----            ----                           -------------   -----
System.String   TrustedHosts                                   DELDC2,MUMDC1,MUMDC2

DELDC2, MUMDC1 and MUMDC2 servers are now listed under TrsustedHosts. You can now run PowerShell remoting commands on these remote servers from your local server (DELDC1).

PS C:> Get-WindowsFeature -ComputerName DELDC2 AD-Domain-Services

Display Name                                            Name                       Install State
------------                                            ----                       -------------
[ ] Active Directory Domain Services                    AD-Domain-Services             Available

You did not get any error this time; remote commands are now working. The windows feature ‘Active Directory Domain Services’ in now listed as available on remote server.

Install Active Directory Domain Services

Next step is to Install the AD DS binaries as we did using Server Manager GUI. The interesting thing is that the Server Manager also uses Windows PowerShell cmdlets behind the scenes. Whatever command you give in Server Manager GUI, it is converted to relevant PowerShell cmdlet and run in background.

To install AD DS binaries run the command as shown below:

PS C:> Install-WindowsFeature AD-Domain-Services

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
True    No             Success    {Active Directory Domain Services}

The ADDSDeplyment PowerShell module is installed when you run the above shown command on the server.  Notice that the server is not yet promoted to domain controller. We have just installed the required binaries for AD DS.

Now, you need to import the ADDSDeployment module using Import-Module command. See below example:

PS C:> Import-Module ADDSDeployment

If you did not get any error message as shown above, it means the module is loaded.

The Windows PowerShell cmdlets for adding a new forest, adding new domain, deploying domain controllers and performing other deployment tasks are found in the ADDSDeployment module. To see a list of the available cmdlets in this module, use the Get-Command cmdlet as follows:

PS C:> Get-Command -Module ADDSDeployment

CommandType     Name                                               ModuleName
-----------     ----                                               ----------
Cmdlet          Add-ADDSReadOnlyDomainControllerAccount            ADDSDeployment
Cmdlet          Install-ADDSDomain                                 ADDSDeployment
Cmdlet          Install-ADDSDomainController                       ADDSDeployment
Cmdlet          Install-ADDSForest                                 ADDSDeployment
Cmdlet          Test-ADDSDomainControllerInstallation              ADDSDeployment
Cmdlet          Test-ADDSDomainControllerUninstallation            ADDSDeployment
Cmdlet          Test-ADDSDomainInstallation                        ADDSDeployment
Cmdlet          Test-ADDSForestInstallation                        ADDSDeployment
Cmdlet          Test-ADDSReadOnlyDomainControllerAccountCreation   ADDSDeployment
Cmdlet          Uninstall-ADDSDomainController                     ADDSDeployment

To add a new forest, we will use the Install-ADDSForest cmdlet listed above.

But before actually installing, we need to make sure if our server is ready for this process. We can test this using Test-ADDSForestInstallation cmdlet. This cmdlet will run a prerequisite check on server and will notify us if installation will be successful or not.  The Prerequisites check is a new feature in AD DS 2012 domain configuration.  These checks will alert you with suggested options, and inform you of new security changes that will affect older operating systems. This test is also run when you add a domain controller to existing domain.

PS C:> Test-ADDSForestInstallation

cmdlet Test-ADDSForestInstallation at command pipeline position 1
Supply values for the following parameters:
DomainName: techtutsonline.local
SafeModeAdministratorPassword: *********
Confirm SafeModeAdministratorPassword: *********
WARNING: Windows Server 2012 R2 domain controllers have a default for the security setting named "Allow cryptography
algorithms compatible with Windows NT 4.0" that prevents weaker cryptography algorithms when establishing security
channel sessions.

For more information about this setting, see Knowledge Base article 942564
(http://go.microsoft.com/fwlink/?LinkId=104751).

WARNING: A delegation for this DNS server cannot be created because the authoritative parent zone cannot be found or it
 does not run Windows DNS server. If you are integrating with an existing DNS infrastructure, you should manually
create a delegation to this DNS server in the parent zone to ensure reliable name resolution from outside the domain
"techtutsonline.local". Otherwise, no action is required.

Message                       Context                                      RebootRequired                        Status
-------                       -------                                      --------------                        ------
Operation completed succes... Test.VerifyDcPromoCore.DCP...                         False                       Success

I have run Test-ADDSForestInstallation command in PowerShell and then I am prompted to enter Domain Name. After that I am prompted to enter DSRM password. Finally I got the message that Operation completed successfully. This was only a test; no AD forest and domain is yet created.

To use Install-ADDSForest cmdlet, it is a good idea to take a look at the help page for this cmdlet. This command will show us the syntax and all the parameters this cmdlet can accept as shown below:

PS C:> Get-Help Install-ADDSForest

NAME
    Install-ADDSForest

SYNTAX
    Install-ADDSForest -DomainName <string> [-SkipPreChecks] [-SafeModeAdministratorPassword <securestring>]
    [-CreateDnsDelegation] [-DatabasePath <string>] [-DnsDelegationCredential <pscredential>] [-NoDnsOnNetwork]
    [-DomainMode <DomainMode> {Win2008 | Win2008R2 | Win2012 | Win2012R2 | Default}] [-DomainNetbiosName <string>]
    [-ForestMode <ForestMode> {Win2008 | Win2008R2 | Win2012 | Win2012R2 | Default}] [-InstallDns] [-LogPath <string>]
    [-NoRebootOnCompletion] [-SkipAutoConfigureDns] [-SysvolPath <string>] [-Force] [-WhatIf] [-Confirm]
    [<CommonParameters>]

[output cut]

Take a look at all the parameters and note down which one you have to use in your command.

Install AD DS Forest

To create a new forest and Add the local server as a first domain controller to this forest, Run the following command:

PS C:> Install-ADDSForest –domainname techtutsonline.local –DomainMode Win2012R2 –ForestMode Win2012R2 –DatabasePath "D:NTDS" –SYSVOLPath "D:SYSVOL" –LogPath "D:NTDS" -Force

SafeModeAdministratorPassword: ********* 
Confirm SafeModeAdministratorPassword: ********* 
The target server will be configured as a domain controller and restarted when this operation is complete. 
Do you want to continue with this operation? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A

If you want to run this command on remote server (DC2), you can use the above command in the following fashion:

PS C:> Invoke-Command -ComputerName DC2 -ScriptBlock {Install-ADDSForest –domainname techtutsonline.local –DomainMode Win2012R2 –ForestMode Win2012R2 –DatabasePath "D:NTDS" –SYSVOLPath "D:SYSVOL" –LogPath "D:NTDS" -Force
}

Note that I have changed the path of database, log files and sysvol. Also note that I had not added -SafeModeAdministratorPassword parameter in command. So, the PowerShell prompted me to enter the password when I hit enter. I have not included this parameter here because PowerShell accepts password as a secure string and it will be complicated for you if are new to PowerShell.  If you wish to provide the password in the command, then it must be a Secure string using the ConvertTo-SecureString cmdlet. You can add –SafeModeAdministratorPassword (ConvertTo-SecureString ‘[email protected]’ –AsPlainText –Force) at the end of command.

If you typed A at confirmation prompt, then the server will be prompted to domain controller and it will restart automatically after installation. You can add –NoRebootOnCompletion parameter in command if you want to suppress the automatic restart of server.

Add Additional Domain Controller to Existing Domain

You can use the Install-ADDSDomainController cmdlet to install an additional domain controller in an existing domain. For example, the following command installs and promotes a new domain controller and DNS server in the techtutsonline.local domain using domain administrator credentials:

PS C:>Install-ADDSDomainController -InstallDns -Credential `
(Get-Credential techtutsonlineadministrator) -DomainName techtutsonline.local

You will be prompted to provide and confirm the DSRM password and password for techtutsonlineadministrator during the installation process.

Add Read-Only Domain Controller

You can use the Add-ADDSReadOnlyDomainControllerAccount cmdlet to create an RODC account that can be used to install an RODC in your forest. After you have created the RODC account, you can use the Install-ADDSDomainController cmdlet with the –ReadOnlyReplica parameter to deploy a new RODC in an existing domain.

To Remove AD DS using PowerShell

To uninstall AD DS and demote the Operation Master Roles from server, you can use  Uninstall-ADDSDomainController cmdlet. If the logged on user does not have enough privileges, you can use -credential argument to run the command with Enterprise Admins privilege:

PS C:> Uninstall-ADDSDomainController –Forceremoval -Demoteoperationmasterrole

Back

В статье подробно разберем процесс развертывания контроллер домена на базе Windows Server 2012 R2 и настройка служб AD DS, DNS, DHCP.

Наша задача:

  • Установить Windows Server 2012 R2 и подготовить систему к развертыванию служб.
  • Развернуть службы Active Directory + DNS, выполнить настройку служб.
  • Развернуть службу DHCP, выполнить настройку обслуживания подсети 192.168.0.0/24.

Проделываться все действия будут на виртуальной машине.

Установка Windows Server 2012 R2 и настройка

При выборе типа устанавливаемой системы, выбираем Windows Server 2012 R2 Standart with GUI. Далее саму установку я пропущу, т.к. она полностью тривиальная.

После установки системы, обязательно обновляем систему до актуального состояния. Изменяем имя ПК (прим. DC1).

В настройках TCP/IP указываем статические IP-адреса (прим. как на скриншоте ниже)

Изменяем временную зону, выбираем относящуюся к нам зону (+03:00 Moscow, St. Petersburg, Volgograd).

На этом базовая подготовка системы выполнена, можно приступать к развертыванию служб.

Разворачиваем службы Active Directory + DNS

Добавляем новую роль Server ManagerManageAdd Roles and Features. Отмечаем галочкой пункт Skip this page by default (чтобы в будущем не видеть эту страницу) и нажимаем Next.

Выбираем первый пункт Role-based or feature-based installation (Базовая установка ролей и компонентов). Второй пункт Remote Desktop Service installtion предназначен только для установки роли удаленных рабочих столов. Нажимаем Next.

Выбираем Select a server from the server pool и выбираем сервер на котором будет развернута роль. Пункт Select a virtual hard disk позволяет указать сервер расположенный на VHD-диске. Нажимаем Next.

Отмечаем галочкой роль Active Directory Domain Services, в подтверждающем запросе добавления роли и компонентов, необходимых для установки AD нажимаем Add Features и после нажимаем Next.

В этом окне предлагается выбрать дополнительные компоненты, в моем случае дополнительные компоненты не нужны, поэтому нажимаю Next.

Информационная страница на которой обращается внимание на то что желательно иметь несколько контроллеров домена, на случай выхода из строя основного. Служба AD DS требует установленного в сети DNS-сервера, если он не установлен, то будет предложено его установить, а так же AD DS требует установки дополнительных служб DFS Namesspases (пространства имен), DFS Replication (DFS репликации) и File Replication (Файловой репликации). Нажимаем Next

На завершающей странице мастера отображается информация по устанавливаемым компонентам. Так же здесь можно экспортировать конфигурацию в  xml-файл (Export configuration settings), на случай если нужно развернуть идентичный сервер. Нажимаем Install.

После установки Роли, в Server Manager нажимаем на значок Флажка с восклицательным знаком и выбираем Promote this server to a domain controller (Повысить этот сервер до контроллера домена). Запустится мастер конфигурирования AD DS.

Необходимо выбрать вариант развертывания AD DS.

  • Add a domain controller to an existing domain — добавить дополнительный контроллер домена в существующем домене.
  • Add a new domain to an existing forest — добавить новый домен в существующем лесу:
  • Tree Domain —  корневой домен нового дерева в существующем лесу
  • Child Domain — дочерний домен в существующем лесу
  • Add New Forest — создать новый корневой домен в новом лесу.

Выбираем вариант Add New Forest, указываем корневое имя домена, нажимаем Next.

В параметрах контроллера домена оставляем по умолчанию функционал леса и домена, проверяем отмечен ли галочкой пункт Domain Name System (DNS), будет автоматически поднята роль DNS и задаем пароль для режима восстановления служб каталогов. Нажимаем Next.

Не обращаем внимание на предупреждение ошибки делегирования для этого DNS-сервера, т.к. роль DNS поднимается в процессе конфигурации AD DS. Нажимаем Next.

Оставляем подставленное мастером NetBIOS имя. Нажимаем Next.

Пути к каталогам оставляем по-умолчанию. Нажимаем Next.

Вывод сводной информации по настройке AD DS. Нажимаем Next.

Дожидаемся выполнения предварительной проверки и если проверка прошла успешно, то мастер нам сообщит об этом: All prerequisite checks are passed successfully. Click «install» to begin installation. (Все предварительные проверки пройдены успешно. Нажмите кнопку «установить», чтобы начать установку.). Нажимаем Install.

В ходе установки конфигурации AD DS, система будет перезагружена. После перезагрузки добавим зону обратного просмотра в DNS. Зоны обратного просмотра служат для разрешения IP-адресов в имена устройств.

Запускаем Server Manager, выбираем роль DNS и на сервере жмем правой кнопкой мыши. Выбираем пункт DNS Manager (Диспетчер DNS).

Выделяем вкладку Reverse Lookup Zones, нажимаем правой кнопкой и выбираем New Zone.

Задаем тип добавляемой зоны:

  • Primary zone — Основная зона. Зона хранится на DNS-сервере, является основной. DNS-сервер становится основным источником сведений об этой зоне.
  • Secondary zone — Дополнительная зона. DNS-сервер становится дополнительным источником сведений о зоне. Зона на этом сервере должна быть получена от другого удаленного компьютера DNS-сервера, который также хранит зону.
  • Stub zone — Зона заглушка. DNS-сервер становится источником сведений только о полномочных серверах имен для этой зоны.

Выбираем Primary zone и нажимаем Next.

Предлагается выбрать как будет выполнятся репликация добавляемой зоны:

  • То all DNS servers running on domain controllers in this forest — Репликации во всем лесу AD включая все деревья доменов.
  • То all DNS servers running on domain controllers in this domain — Репликация внутри текущего домена и его дочерних доменов.
  • То all domain controllers in this domain — Репликация на все контроллеры домена внутри текущего домена и его дочерних доменов.
  • To all domain controllers specified in the scope of this directory partition — Репликация на все контроллеры домена, но DNS-зона располагается в специальном каталоге приложений. Поле будет доступно для выбора, после создания каталога.

Выбираем То all DNS servers running on domain controllers in this domain. Нажимаем Next.

Выбираем протокол заданный по умолчанию IPv4 Reverse Lookup Zone. Нажимаем Next.

Задаем параметр Network ID. В моем случае 192.168.0. В поле Reverse Lookup Zone Name автоматически подставится адрес зоны обратного просмотра. Нажимаем Next.

Выбор параметра динамического обновления:

  • Allow only secure dynamic updates (recommended for Active Directory) — Разрешить только безопасные динамические обновления.
  • Allow both nonsecure and secure dynamic updates — Разрешить любые динамические обновления, как безопасные так и нет.
  • Do not allow dynamic updates — Не разрешать динамические обновления.

Выбираем Allow both nonsecure and secure dynamic updates. Нажимаем Next.

В завершении добавлении зоны обратного просмотра нажимаем Finish.

Теперь укажем Forwarders (Серверы пересылки). Серверы пересылки служат для того чтобы кэшировать и перенаправлять DNS-запросы с локального DNS-сервера на внешний DNS-сервер в сети интернет. Это нужно для того чтобы локальные компьютеры доменной сети смогли получить доступ в интернет.

В оснастке DNS Manage (Диспетчер DNS) выделяем наш сервер и нажимаем правой кнопкой мыши. Выбираем Properties. Переходим во вкладку Forwarders и нажимаем на Edit.

В поле <Click here to add an IP Address or DNS Name> вбиваем IP-адрес или DNS имя, например провайдера или можно 8.8.8.8 (DNS Google). Нажимаем OK.

Теперь локальные компьютеры состоящие в доменной сети, смогут выходить в интернет.

Поднимаем службу DHCP и выполняем настройку ее

Добавляем новую роль Server ManagerManageAdd Roles and Features. Выбираем первый пункт Role-based or feature-based installation (Базовая установка ролей и компонентов). Нажимаем Next.

Выбираем Select a server from the server pool и выбираем сервер на котором будет развернута роль. Нажимаем Next.

Отмечаем галочкой роль DHPC Server, в подтверждающем запросе добавления роли и компонентов, необходимых для установки DHCP Server нажимаем Add Features и после нажимаем Next.

В моем случае дополнительные компоненты не нужны, поэтому нажимаю Next.

Информационная страница на которой обращается внимание на то что необходимо настроить на компьютере статический IP-адрес и перед установкой DHCP сервера нужно спланировать подсеть, области и исключения. Нажимаем Next.

На завершающем этапе установки, нажимаем Install.

После установки Роли, в Server Manager нажимаем на значок Флажка с восклицательным знаком и выбираем Complete DHCP configuration (Завершить конфигурацию DHCP). Запустится мастер после установочной конфигурации DHCP.

Информационная страница, на которой сообщается что будут созданы группы безопасности администратора и пользователя DHCP-сервера, и будет произведена авторизация в AD. Нажимаем Next.

На следующем экране нажимаем Commit что бы завершить процесс авторизации в Active Directory.

Если процесс создания групп безопасности и авторизация в AD прошли успешно, то получим вывод Done. Нажимаем Close.

Запускаем Server Manager, выбираем роль DHCP и на сервере жмем правой кнопкой мыши. Выбираем пункт DHCP Manager (Диспетчер DHCP).

Выполним настройку DHCP. Создадим рабочий диапазон адресов из которого будут выдаваться адреса клиентам. Создавать диапазон будем в зоне IPv4. Выбираем протокол IPv4 и нажимаем ActionNew Scope… или на иконку отмеченную ниже.

Задаем имя области и ее описание. Нажимаем Next.

Определяем начальный и конечный адрес диапазона подсети. Нажимаем Next.

По желанию можно задать диапазон адресов которые не будут выдаваться клиентам. Для задания диапазона исключения указываем начальный адрес и конечный и нажимаем Add. По окончании нажимаем Next.

Задаем время аренды выданного IP-адреса. Нажимаем Next.

Указываем Yes, I want to configure these options now (Да, я хочу настроить опции сейчас). Нажимаем Next.

Указываем адрес шлюза. Нажимаем Next.

Параметры задания доменного имени, DNS сервера и WINS Servers пропускаем, оставляем указанных значения по-умолчанию. Нажимаем Next.

Соглашаемся с активацией заданной области, выбираем Yes, I want to activate thisscope now. Нажимаем Next.

На этом установка и настройка AD DS, DNS, DHCP завершена.

Сервер готов к работе, можно заводить компьютеры в домен.

Понравилась или оказалась полезной статья, поблагодари автора

 

ПОНРАВИЛАСЬ ИЛИ ОКАЗАЛАСЬ ПОЛЕЗНОЙ СТАТЬЯ, ПОБЛАГОДАРИ АВТОРА

Загрузка…


Table of Contents

  • Using Server Manager (UI):
    • Installing the AD DS role
      • Promoting Windows 2012 Server to Domain Controller
  • Using PowerShell
  • Other Languages

In Windows Server 2012, dcpromo has been deprecated.


Using Server Manager (UI):

In order to make the windows server 2012 domain controller we will install ADDS (Active Directory Domain Services) role from the server manager on Windows Server 2012.

All the Latest security updates must applied before installing the Role.

First we will change the server name let say DC01 and the IP address 10.10.21.1 (try to avoid using default 192.168.0.1)

Installing the AD DS role

  

“Before You Begin” screen provides you basic information such as configuring strong passwords, IP addresses and Windows updates.

On Installation Type page, select the first option “Role-based or Feature-based Installation“.

Scenario-based Installation option applied only to Remote Desktop services.

On the “Server Selection” Page, select a server from the server pool
and click next.

To install AD DS, select Active Directory Domain Services in turn it will pop-up to add other AD DS related tools. Click on
Add Features.

After clicking “Add Features” above, you will be able to click “Next >” as shown in the screen below.

On the “Select Features” Page, Group Policy Management feature
automatically installed during the promotion. Click next.

On the “Active Directory Domain Services” page, it gives basic information about AD DS. Click Next.

On the “Confirmation” Page, You need to confirm this to continue with this configuration. It will provide you an option to export the configuration settings and also if you want the server to be restarted automatically as required.

 After clicking “Install” the selected role binaries will be installed on the server.

 After “Active Directory Domain Services” role binaries have been installed and now it is time to promote the server to a Domain Controller.

TechNet Article:

  • Install Active Directory Domain Services.

Promoting Windows 2012 Server to Domain Controller

To create a new AD forest called “ArabITPro.local”, select add a new forest.

Type the name ArabITPro.local

Specify the FFL, DFL, whether or not it should be a DNS Server and also the DSRM administrator password.

As you can see, it has selected the GC option by default and you cannot deselect it.

The reason for this is that is the very first DC of the AD forest and at least one needs to be a GC.

DNS delegation warning.

Checks the NetBIOS name already assigned.

Specify the location of the AD related folders and then click next.

Summary Of All Installation Options/Selections.

Click View script for single command line PowerShell script for dcpromo.

Before the actual install of AD, all prerequisites are checked. If All prerequisite checks are passed successfully then click
Install.

When you click Install, DNS and the GPMC are installed automatically.

After the promotion of the server to a DC finished server restart automatically.

Once the server is booted and you logon to it, click on Server Manager | Tools , will notice that following have been installed:

  • Active Directory Administrative Center
  • Active Directory Domains and Trusts
  • Active Directory Module for Windows PowerShell
  • Active Directory Sites and Services
  • Active Directory Users and Computers
  • ADSI Edit
  • DNS
  • Group Policy Management

TODO: Next step is to install the replica domain controller for high availability.


Using PowerShell

TODO


Other Languages

  • Guía paso a paso para configurar el controlador de dominio de Windows Server 2012 (es-ES)
  • Windows Server 2012: Konfiguracja kontrolera domeny krok po kroku (pl-PL)

Понравилась статья? Поделить с друзьями:
  • Как установить active directory на windows server 2008
  • Как установить acrobat reader на windows 10
  • Как установить achi в установленном windows 10
  • Как установить ace stream на windows 10
  • Как установить access на windows 10 если остальные программы офиса есть