Windows 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

Windows Server Core is a good platform to host the Active Directory domain controller role due to fewer resource requirements, increased stability and security (due to less code and updates). In this article, we’ll show how to install a domain controller on Windows Server Core 2019 in a new or existing Active Directory forest using PowerShell.

Contents:

  • How to Install Active Directory Domain Controller Using PowerShell?
  • Checking Domain Controller Health on Server Core
  • Installing an AD Domain Controller Using Windows Admin Center (WAC)

How to Install Active Directory Domain Controller Using PowerShell?

Install the Windows Server Core on a new host (physical or virtual), configure the basic host settings: set its hostname, network settings (static IP address, subnet mask, gateway, DNS), date/time, time zone, etc.

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

The next step is to install the Active Directory Domain Services (ADDS) role. To do it, run the following command in the PowerShell console:

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

Install-WindowsFeature AD-Domain-Services on Windows Server Core

Make sure that the AD-Domain-Services role is installed:

Get-WindowsFeature -Name *AD*
ADDS role is installed on WIndows Server Core 2019

After installing the ADDS role, you can use ADDSDeployment module cmdlets to deploy a new domain, forest, or additional domain controller:

Get-Command -Module ADDSDeployment

ADDSDeployment PowerShell module - promotr the domain controller

There are three possible scenarios:

  • Installation of new Active Directory forest: Install-ADDSForest -DomainName woshub.com -ForestMode Win2016 -DomainMode Win2016 -DomainNetbiosName WOSHUB -InstallDns:$true
  • The Install-ADDSDomain cmdlet allows to create a new domain in an existing Active Directory forest
  • Install-ADDSDomainController – allows to add a new (additional) domain controller to an existing Active Directory domain

In most cases, you will use the 3rd scenario — adding an additional domain controller to an existing Active Directory domain.

Before promoting a new domain controller, make sure that your Active Directory domain works correctly. Check the errors on each DC carefully that are returned by Dcdiag /v and check the AD replication (repadmin /showrepl and repadmin /replsum). Make sure that you have an up-to-date AD domain controller backup.

In the simple scenario, when you want to add a new extra DC to the Default-First-Site-Name site, run this command:

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

In this example, I have additionally specified that the AD database, logs, and SYSVOL are stored on a separate disk. By default, they are located in %SYSTEMROOT%\NTDS and %SYSTEMROOT%\SYSVOL.

Also, you can specify the Active Directory site you want to place your new domain controller. We will also specify that the DC will be the Global Catalog and set the DSRM (Directory Services Restore Mode) password using the ConvertTo-SecureString command:

Install-ADDSDomainController -DomainName woshub.com -InstallDns:$true -NoGlobalCatalog:$false -SiteName 'Hamburg' -NoRebootOnCompletion:$true -Force:$true -SafeModeAdministratorPassword (ConvertTo-SecureString 'R0DCP@ssw0rd' -AsPlainText -Force) -Credential (get-credential WOSHUB\Administrator) –verbose

Install-ADDSDomainController install additional active directory domain controller on windows server core

Check the command output carefully, if it is ok, then restart your host:

Restart-Computer

Checking Domain Controller Health on Server Core

After the domain controller installation, do some basic checks to make sure that the new domain controller has been successfully added to the domain and takes part in replication.

You can manage a domain controller on Windows Server Core from another server using the standard graphic Active Directory snap-ins (dsa.msc, gpmc.msc, dnsmgmt.msc, dssite.msc, adsiedit.msc, domain.msc) or from a computer running Windows 10 with RSAT installed (Rsat.ActiveDirectory.DS-LDS.Tool).

Open the ADUC (dsa.msc) console on any computer and make sure that the new DC appeared in the Domain Controllers OU.

New domain controller in ADUC

After Windows Server Core restart, you must login to the host under a domain administrator account.

Using the Get-ADDomainController cmdlet, make sure that the domain controller is located on the correct AD site:

Get-ADDomainController -Discover

Get-ADDomainController - checking AD site

Check that Active Directory services are running:

Get-Service adws,kdc,netlogon,dns

check Active Directory services state on domain controller

In addition to the built-in hidden admin shares, the SYSVOL and NETLOGON folders must be shared:

Get-SMBShare

SYSVOL and NETLOGON - logon server shares on DC

Make sure that there are ADDS events in the Event Viewer:

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

Then perform a test using the dcdiag command (all stages must be Passed), and check replication between the DCs using the following commands:

repadmin /replsummary

or

Get-ADReplicationFailure -Target DC03

Check where the FSMO roles are located in your domain and forest. If necessary, transfer the FSMO roles to your new DC:

Netdom /query FSMO

Installing an AD Domain Controller Using Windows Admin Center (WAC)

To install a domain controller in Windows Server Core, you can also use Windows Admin Center (WAC) web interface.

  1. Add your Windows Server Core host to the Windows Admin Center interface;
  2. To install the ADDS role, open the Roles and Features section, select Active Directory Domain Services in the list of available roles and click Install;
  3. Confirm the installation of the role and administration tools; Windows Admin Center installing Active Directory Domain Services role
  4. To promote the Windows Server Core to the domain controller, open the PowerShell web console and use the cmdlets shown above to configure the DC; prome windows server to AD domain controller via WAC
  5. When the DC installation is over, restart Server Core and reconnect it to WAC using a domain account;
  6. To manage Active Directory from the web interface, install a special WAC extension (it is available in Preview mode yet). So a new section will appear in your Windows Admin Center, where you can view and manage your AD tree. Browse Active Directory OUs in WIndows Admin Center

В этой статье я покажу, как устанавливать службы Active Directory Domain Services, и настраивать роль контроллера домена (Domain Controller) на Windows Server 2022 Core, который идеально для этого подходит из за уменьшенных требований к ресурсам, повышенной стабильности и безопасности. В этом случае для настойки используется PowerShell. Устанавливать службы AD DS буду на сервер, который был настроен в прошлой статье про Windows Server Core.

Предварительные настройки

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

  • Используемая подсеть: 192.168.50.0/24
  • Основной шлюз: 192.168.50.1
  • IP-адрес контроллера домена: 192.168.50.10
  • Имя контроллера домена: srv-dc01
  • Полное имя домена: proitclub.ru

srv-dc01 настройки сети

По результату вывода команды ipconfig /all видно, что сервер настроен в соответствии с вышеуказанными настройками.

Установка служб Active Directory Domain Services (AD DS)

Следующим шагом будет установка служб AD DS. Для этого в консоли PowerShell выполним команду:

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

adds install

Ждем окончания ее выполнения, и проверяем установленные службы командой:

Get-WindowsFeature -Name "AD-Domain-Services"

adds install success check

Так как у нас нет никакой структуры Active Directory, то нам потребуется сначала создать лес, а потом первый домен в нашем лесу. Для этого используем командлет Install-ADDSForest из модуля ADDSDeployment. Команда для создания нового леса и первого домена будет иметь следующий вид:

Install-ADDSForest -DomainName "proitclub.ru" -ForestMode "Default" -DomainMode "Default" -DomainNetbiosName "proitclub" -InstallDns:$true

У этого командлета много аргументов, рассмотрим некоторые из них на нашем примере.

  • DomainName: задает имя нашего домена, а также имя нового леса.
  • ForestMode: задает функциональный уровень нашего леса. По умолчанию (Default) выбирается максимальный уровень, которым в настоящее время является Windows Server 2016. Задается значениями 7 или WinThreshold.
  • DomainMode: задает функциональный уровень нашего домена. Здесь также по умолчанию (Default) выбирается максимальный уровень. И точно также как и для ForestMode значения 7 или WinThreshold.
  • DomainNetbiosName: задает NetBIOS-имя домена.
  • InstallDns: задает параметр для установки DNS-сервера — $true или $false. Так как у меня еще нет ни одного DNS-сервера, то я передаю параметр $true для его установки.

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

add forest

Первое, что мы видим — это запрос на ввод пароля: Safemodeadministratorpassword. Этот пароль вам потребуется для загрузки в режиме Directory Services Restore Mode (DSRM), который служит для восстановления каталога Active Directory.

Теперь подробнее разберем вывод этой команды.

  • Create a new Active Directory forest with the name ‘proitclub.ru’: создается новый лес с именем «proitclub.ru».
  • Configure this server as the first Active Directory domain controller in a new forest: роль текущего сервера повышается до контроллера домена в новом лесу.
  • The new domain name is «proitclub.ru». This is also the name of the new forest:  новому домену присваивается имя «proitclub.ru».
  • The NetBIOS name of the domain: proitclub: NetBIOS-имя домена «proitclub».
  • Forest Functional Level: Default: функциональней уровень леса устанавливается максимально возможный — в нашем случае Windows Server 2016.
  • Domain Functional Level: Automatically calculated: функциональный уровень домена выбирается автоматически — в нашем случае Windows Server 2016.
  • Global catalog: Yes — сервер является сервером глобального каталога.
  • DNS Server: Yes — сервер является DNS-сервером.
  • Create DNS Delegation: No — не делать делегирование DNS для этого сервера.  
  • Database folder: C:\Windows\NTDS, Log file folder: C:\Windows\NTDS, SYSVOL folder: C:\Windows\SYSVOL — пути для хранения базы Active Directory, ее лог-файлов и папки SYSVOL.
  • The DNS Server service will be configured on this computer: на этом компьютере будет настроен DNS-сервер.
  • This computer will be configured to use this DNS server as its preferred DNS server: сервер будет настроен на использование своего адреса в качестве предпочтительного DNS-сервера.
  • The password of the new domain Administrator will be the same as the password of the local Administrator of this computer: пароль учетной записи Администратора домена будет такой же как у локального Администратора.

В целом меня все устраивает, и можно уже выполнять команду без аргумента Whatif. После окончания установки сервер будет автоматически перезагружен.

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

install finished

На этом установка служб Active Directory и контроллера домена закончена. Для рабочей среды рекомендую держать как минимум два контроллера домена с DNS-сервером для обеспечения отказоустойчивости в случае падения одного из них. И, конечно, не забывать своевременно делать бэкапы. Они вам очень помогут, например, в случае заражения серверов каким-нибудь шифровальщиком.

In the first part of this series, I discussed the benefits of the available Server Roles in Server Core installations of Windows Server 2012. Today, let’s get hands-on by configuring a Windows Server 2012 Server Core installation as a Domain Controller.

Contents

  1. Active Directory and Server Core
  2. First steps
  3. Configuring Server Core as a Domain Controller
    • Creating the first Domain Controller in a forest
    • Creating a replica Domain Controller
    • Cloning a Domain Controller
  4. Managing Active Directory on Server Core
    • Managing Server Core Domain Controllers
    • Managing Active Directory contents
  5. Concluding
  • Author
  • Recent Posts

Active Directory and Server Core

Since the first release of Server Core in Windows Server 2008, the Active Directory Domain Services Server Role has been available to configure Server Core installations as Domain Controllers.

However, with Windows Server 2008 R2, Microsoft introduced the Active Directory Web Service on the Domain Controller to serve as an endpoint for the Active Directory Administrative Center and the Active Directory PowerShell cmdlets. Microsoft introduced the Active Directory Web Services gateway for Windows Server 2003 and Windows Server 2008 to allow the Active Directory Administrative Center and the Active Directory PowerShell cmdlets to communicate with these hosts. This download, however, is not available for Server Core installations of Windows Server 2008. This explains the few remaining Windows Server 2008 Server Core­-based Domain Controllers; most previously deployed Server Core-based Domain Controllers have been upgraded to Windows Server 2008 R2.

In Windows Server 2012, Microsoft introduced significant new functionality in Active Directory Domain Services, including virtualization-safe Active Directory, Domain Controller Cloning, Dynamic Access Control (DAC), and Active Directory-Based Activation. All of this functionality is also available in Server Core installations of Windows Server 2012.

First steps

When you want a Windows Server to operate as an Active Directory Domain Controller, you need to perform a few steps:

  1. Provide the host with a meaningful NetBIOS name.
  2. Configure appropriate networking settings, including fixed IP addresses, name resolving settings, and suffix settings. (As a best practice, try to avoid creating a disjoint namespace.)
  3. Update the server with all appropriate Service Packs and Windows Updates.
  4. Activate the Windows Server installation.
  5. Implement Information Security measures (like anti-malware, UPS).

Configuring Server Core as a Domain Controller

  • Configuring a Windows Server 2012-based Server Core installation as a Domain Controller starts with one of the following:
  • Promoting a standalone server to a Domain Controller for a new domain
  • Promoting a member server to a replica or read-only replica Domain Controller (also known as an additional Domain Controller)
  • Cloning a Windows Server 2012-based Server Core Domain Controller to a new replica Domain Controller

Note: Because there are three ways to promote a server to a Domain Controller (described above) and three different toolsets, I’ll show you each of the ways with a different toolset.

Creating the first Domain Controller in a forest

With the essentials covered in the “first step” section (above), creating your first Domain Controller is as easy as running a single command:

dcpromo.exe /unattend /NewDomain:forest /ReplicaOrNewDomain:Domain /NewDomainDNSName:domain.tld /DomainLevel:4 /ForestLevel:4 /SafeModeAdminPassword:"P@ssw0rd"

Note: That’s right! There’s no need to install the Active Directory Domain Controller role, or anything like that, as you’d need to do on a Server with a GUI Domain Controller.

After promoting the server to a fresh Domain Controller for a fresh new Domain in a fresh Forest, the server will automatically restart:

dcpromo - unattended command promotion

dcpromo unattended command promotion

Of course, dcpromo.exe has way more tricks up its sleeve beyond the many defaults automatically selected in the example above. All its command line switches are explained on TechNet.

Creating a replica Domain Controller

An Active Directory best practice is to have at least two Domain Controllers hosting each of your Active Directory Domains. A Server Core installation lends itself to this task. The easiest way to achieve this is to use an unattended installation file on a domain-joined installation. The first thing you do is open Notepad.exe and type (or paste in) the following text:

[DCInstall]
createOrjoin= join
replicaDomainDNSName = domain.tld
ReplicaOrNewDomain = Replica
UserDomain = DOMAIN
Username = administrator
Password = "P@ssw0rd1"
InstallDNS = Yes
ConfirmGc = Yes
CreateDNSDelegation = No
SafeModeAdminPassword = "P@ssw0rd"

dcpromo - unattend answer file

dcpromo — unattend answer file

Save the file to a suitable location and then run the following command:

dcpromo.exe /unattend:C:\dcpromo.txt

Again, this is a sample unattended answer file. For more options, take a look at Microsoft Knowledgebase article 947034.

Cloning a Domain Controller

Windows Server 2012 introduces Domain Controller Cloning for virtualized Domain Controllers. This dramatically reduces the time to get the second Domain Controller from the best practice and might also assist you in your backup and recovery strategies.

You need to cover a couple of prerequisites before you can start thinking about cloning, but when you have, cloning a Server Core Domain Controller can be performed in these six steps:

  1. Grant the source Domain Controller the ability to clone by adding the computer account of the virtualized source Domain Controller to the Cloneable Domain Controllers group with the following PowerShell command:
    Add-ADGroupMember "Cloneable Domain Controllers" "cn=dc01,ou=Domain Controllers,dc=domain,dc=tld"
  2. Check for DC Cloning blockers with Get-ADDCCloningExcludedApplicationList and examine the outcome. Resolve any issues that might arise by uninstalling the application, disabling the Windows Feature, or simply ignoring the blocker with the following PowerShell command:
    Get-ADDCCloningExcludedApplicationList -GenerateXml -Path C:\Windows\NTDS -Force
  3. Write the DCCloneConfig file using the following PowerShell command:
    New-ADDCCloneConfigFile -CloneComputerName "dc02" -Static -IPv4Address "192.168.0.2" -IPv4SubnetMask "255.255.255.0" -IPv4DefaultGateway "192.168.0.254" -IPv4DNSResolver "192.168.0.1"

    Note: Alternatively, you can use the New-ADDCCloneConfigFile command without parameters to create auto-named DHCP-enabled Domain Controllers.

  4. Shut down the source Domain Controller.
  5. Base a new virtual Domain Controller on the virtual hard disk of the source Domain Controller.
  6. Start the source Domain Controller and start the cloned Domain Controller.

More information can be found in the Introduction to Active Directory Domain Services (AD DS) Virtualization.

Managing Active Directory on Server Core

Once your Server Core installations are fully functioning Domain Controllers, there are multiple ways to manage the contents of Active Directory and the Domain Controllers themselves.

Managing Server Core Domain Controllers

Just like on Server with a GUI installations, you can use tools such as ntdsutil.exe, dcdiag.exe, dslint.exe, ldp.exe, setspn.exe, nltest.exe, csvde.exe, ldifde.exe and repadmin.exe on Server Core Domain Controllers.

Also, in Windows Server 2012, a collection of new Active Directory PowerShell cmdlets is available to you to create read-only Domain Controllers (Add-ADDSReadOnlyDomainControllerAccount), demote Domain Controllers (Uninstall-ADDSDomainController), and troubleshoot Active Directory replication (with the 23 Get-ADRerplication*¸New-ADReplication, Remove-ADReplication*, and Set-ADReplication* cmdlets, Get-ADTrust and Sync-ADObject).

Needless to say, you can run these commands remotely through WinRS, Remote Desktop, and/or PowerShell Remoting. Also, all the fine Joeware command line utilities work on Server Core installations.

Managing Active Directory contents

On the command line, tools like dsadd.exe, dsquery.exe, dsget.exe, dsmod.exe, dsrm.exe, and dsmove.exe are available as they’ve been for the last decade. With PowerShell, you can use any of the 28 account management cmdlets, 7 group management cmdlets, 10 password settings cmdlets, 7 Managed Service Account (MSA) cmdlets, and 26 Dynamic Access-related cmdlets.

For managing the contents of Active Directory Domain Services, you can go wild on the console of your Server Core Domain Controllers, or you can manage remotely from the comfort of your office chair. Active Directory Administrative Center (dsac.exe), Active Directory Users and Computers (dsa.msc), Active Directory Sites and Services (dssite.msc), Active Directory Domains and Trusts (domain.msc), and ADSI Edit (adsiedit.msc) can all be used from Windows Server 2012 installations and Windows 8 installations with the Remote Server Administration Tools (RSAT) installed:

Server Core Remote Active Directory Management

Server Core Remote Active Directory Management

Concluding

Remotely, a Server Core Domain Controller feels exactly the same as a Server with a GUI-based Domain Controller. Of course, in the back of your mind, you’d always know your Server Core Domain Controller is a lot faster, safer, and more reliable than your neighbor’s.

Articles in seriesServer Roles in Sever Core

  1. Server Roles in Server Core
  2. How to configure Server Core as Domain Controller
  3. How to install a DNS Server on Server Core
  4. How to install a DHCP Server on Server Core
  5. How to install File Services on Server Core
  6. Certificate Server in Server Core
  7. Install and manage a Print Server in Server Core
  8. Server Core Remote Access Services -DirectAccess and Routing
  9. How to install Hyper-V on Server Core
  10. Internet Information Services (IIS) on Server Core
  11. How to install the FTP Server Role on Server Core
  12. WSUS on Server Core

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

Преобразование переделать из Eval в стандартную редакцию и активация ОБЯЗАТЕЛЬНО ДО ОБНОВЛЕНИЯ!!!

В RDP сессии:

sconfig

выбрать пукт 6
Search for for (A)ll updates or (R)ecommended updates only? a

Select an option:
(A)ll updates, (N)o updates or (S)elect a single update? a

  • Для превращения сервера в DC, пользователь выполняющий операцию должен быть в группах «Enterprise Admins» и «Schema Admins»

Add-ADGroupMember -Identity «Enterprise Admins» -Members ad-shvetsov -Verbose

Add-ADGroupMember -Identity «Schema Admins» -Members ad-shvetsov -Verbose

  • Задать primary DNS в настрйоках адаптера — IP контроллера с ролью эмулятора PDC через sconfig или командой

Set-DnsClientServerAddress -InterfaceAlias MGMT -ServerAddresses «DNS1» -Verbose

При установке роли доменного контроллера Secondary DNS сервер автоматичеки установится 127.0.0.1, Если контроллеров больше двух, то можно задать этот адрес третьим после адресов двух других контроллеров.

Поднятие сервера до контроллера домена

  • Поднятие сервера до контроллера домена

Import-Module ADDSDeployment # Импортируем спец модульInstall-ADDSDomainController -DomainName %Domain FQDN% -InstallDns -Verbose # Поднимаем сервер до уровня DC

# При этом будет запрос пароля для учетной записи восстановления службы каталогов

  • Сменить адреса DNS на клиентах (массово, если требуется)

$list = «srv1», «srv2»

Invoke-Command -ComputerName $list -ScriptBlock { set-DnsClientServerAddress -InterfaceAlias MGMT -ServerAddresses «DNS1», «DNS2» -Verbose ; ipconfig /flushdns }

Посмотреть текущий DNS в настройках сетевого адаптера локальной машины

Get-DnsClientServerAddress -Family IPv4 | ft
  • Настроить службу времени на синхронизацию на NTP сервере

Должен быть открыт порт 123 udp между новым контроллером и сервером ntp

w32tm /query /source
w32tm /config /manualpeerlist:%ntp_server_fqdn1%, %ntp_server_fqdn1% /syncfromflags:manual /reliable:yes /update

Вывод контроллера

  • Перенести роли FSMO (если есть)
Move-ADDirectoryServerOperationMasterRole -Identity dc-01 -OperationMasterRole 0,1,2,3,4 -Verbose

ИЛИ длинно

Move-ADDirectoryServerOperationMasterRole -Identity dc-01 -OperationMasterRole PDCEmulator,RIDMaster,InfrastructureMaster,SchemaMaster,DomainNamingMaster -Verbose

Захват роли делается с мертвого контроллера делается с ключем -force

  • Понижение до рядового сервера
Import-Module ADDSDeployment
Uninstall-ADDSDomainController

При этом будет запрос пароля для учетной записи локального администратора

  • Удалить выведенный доменный клонтроллер из Sites and Services (через оснастку mmc удаленно)
  •  Удалить свою учетку из группы админов схемы и предприятия
Remove-ADGroupMember -Identity "Enterprise Admins" -Members ad-shvetsov -Verbose

Remove-ADGroupMember -Identity "Schema Admins" -Members ad-shvetsov -Verbose

  • Windows core single language edition
  • Windows copy ssh key to server
  • Windows copy disk to disk
  • Windows converter wav to mp3 converter
  • Windows convert pdf to image