-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Active Directory Administration Cookbook, Second Edition
By :

Read-only domain controllers were introduced with Windows Server 2008. They have been hugely popular for providing Active Directory Domain Services to branch offices and small perimeter networks.
Read-only domain controllers are the ideal type of domain controllers for environments with the following:
These characteristics are typically true for branch offices. Before read-only domain controllers, administrators had to make the hard choice between doing nothing, placing fully (read-write) domain controllers in these locations, or upgrading the available bandwidth and/or resiliency of the networking connections between the branch offices and the head office or central data center(s).
Some organizations have opted to deploy read-only domain controllers in perimeter networks. Microsoft supports only one read-only domain controller per Active Directory site. This way, any perimeter network deployment would not have much Active Directory resiliency. Many organizations have, therefore, opted for a separate Active Directory forest for these implementation scenarios.
Read-only domain controllers have requirements that we need to adhere to before we can deploy and use them:
ADPrep /rodcprep
needs to have run at least once on the domain controller holding the Domain Naming Master FSMO role, but this step may be skipped when the Active Directory environment was never set up or has never run with pre-Windows Server 2008-based domain controllers.Read-only domain controllers allow for scoped replication. It's a recommended practice to determine the user accounts and computer accounts that are strictly needed in the branch office location. The read-only domain controller will be able to cache the passwords for these accounts to speed up authentication for these accounts in the branch office. The Allowed RODC Password Replication Group is the default group in which to add (groups of) user accounts and computer accounts for this functionality.
If you desire strict group memberships for this functionality per read-only domain controller, create the groups you need before you promote the Windows Server installation to a read-only domain controller for which you need the group scope.
Another way to think about security before promoting the first read-only domain controller is to determine the privileged accounts and otherwise sensitive accounts for which you do not want passwords replicated to the read-only domain controller you intend to create. These (groups of) accounts can be specified as the accounts that are denied from replicating passwords to the RODC.
Just like read/write domain controllers, promoting a Windows Server installation to a read-only domain controller consists of three steps:
When using dcpromo.exe
, you do not have to install the role beforehand.
There are several ways to promote the server. The following table displays the possibilities:
Table 2.3 – Methods for installing the Active Directory Domain Services role and promoting a server to a domain controller
The methods in the table are all explained in more detail in this recipe.
There are three ways to install the Active Directory Domain Services role:
Install-WindowsFeature
cmdletTo install the Active Directory Domain Services role using Server Manager, perform these steps:
servermanager.exe
. The Server Manager window appears.Figure 2.8 – Methods for installing the Active Directory Domain Services role and promoting a server to a domain controller
As an alternative to using Server Manager, the Install-WindowsFeature
cmdlet
can be used. Perform the following line of Windows PowerShell in an elevated window to install the Active Directory Domain Services role:
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
The preceding line of Windows PowerShell offers the only way to install the Active Directory Domain Services role on a Server Core installation of Windows Server locally.
Although a PowerShell script can be run from the Windows Admin Center, it also offers a native way to install roles and features. Perform these steps:
There are three ways to promote a Windows Server installation to a read-only domain controller:
Install-ADDSDomainController
cmdlet from the Active Directory module for Windows PowerShell with the dedicated -ReadOnlyReplica
parameterdcpromo.exe
with an answer filePerform these steps to promote the server to a read-only domain controller:
servermanager.exe
or return to Server Manager when you've accomplished installing the Active Directory Domain Services role using Server Manager.Figure 2.9 – The Domain Controller Options screen of the Active Directory Domain Services Configuration Wizard
Figure 2.10 – The RODC Options screen of the Active Directory Domain Services Configuration Wizard
Tip
If a group or an account features in both the accounts that are allowed to replicate passwords to the RODC and accounts that are denied from replicating passwords to the RODC, then the group or account is denied from replicating passwords to the RODC.
SYSVOL
. Click Next > to continue to the Paths screen:Figure 2.11 – The Paths screen of the Active Directory Domain Services Configuration Wizard
C:\Windows
or change the values to store Active Directory-related files somewhere else.Tip
The Review Options screen features a button labeled View script. This button displays the Windows PowerShell script used to execute the read-only domain controller promotion. This reusable script may be a real timesaver, especially when adding several read-only domain controllers to an existing domain.
After successful promotion, the Windows Server installation will reboot as a read-only domain controller.
For the Active Directory module for Windows PowerShell, Microsoft does not offer a dedicated PowerShell cmdlet to add a read-only domain controller. Instead, Install-ADDSDomainController
is used with the dedicated -ReadOnlyReplica
parameter. The simplest script would look like the following code:
Install-ADDSDomainController -DomainName lucernpub.com -Sitename RemoteLocation -ReadOnlyReplica
However, to add a read-only domain controller to an existing domain as you would with the previous example, the following script would be needed:
Install-ADDSDomainController -DomainName lucernpub.com -Credential (Get-Credential) -ReadOnlyReplica -installDNS:$true -NoGlobalCatalog:$false -DatabasePath "E:\NTDS" -Logpath "E:\Logs" -SysvolPath "E:\SYSVOL" -Sitename RemoteLocation
This will add a read-only domain controller to the lucernpub.com
Active Directory domain using credentials you will be prompted for securely. The domain controller will be installed with a DNS server and configured as a global catalog server. All the Active Directory-related files are stored in corresponding folders on the E:\
drive, and, when successful, the Windows Server installation you intend as the domain controller will be rebooted automatically.
Replace the values in the preceding sample script with the values of your choice.
Read-only domain controllers can be promoted using dcpromo.exe
with an answer file or with all the installation arguments specified, just like fully writable domain controllers. An added benefit is that dcpromo.exe
will install the Active Directory Domain Services server role automatically when it's not yet present.
Using dcpromo.exe
with an answer file consists of running the following command line:
dcpromo.exe /unattend: C:\install\dcpromo.txt
A prime example of an answer file to add a read-only domain controller would look like this:
[DCINSTALL]
ReplicaorNewDomain= readonlyreplica
ReplicaDomainDNSName= lucernpub.com
UserDomain= LUCERNPUB
UserName= Administrator
SiteName= RemoteLocation
Password= "P@$$w0rd"
InstallDNS= Yes
ConfirmGC= Yes
CreateDNSDelegation= No
DatabasePath= E:\NTDS
LogPath= E:\Logs
SYSVOLPath= E:\SYSVOL
SafeModeAdminPassword= "P@$$w0rd"
RebootOnSuccess= true
The preceding answer file adds a read-only domain controller to the lucernpub.com
Active Directory domain, using the credentials for the administrator account with the P@$$w0rd
password. The read-only domain controller is installed with a DNS server and configured as a global catalog server. All the Active Directory-related files are stored in corresponding folders on the E:\
drive, and when successful, the Windows Server installation you intend as the read-only domain controller is rebooted automatically.
Replace the values in the preceding sample file with the values of your choice.
The arguments in the answer file can also be specified as command-line arguments. The arguments can be reused one on one, so the preceding sample answer file would correspond to the following command line:
dcpromo.exe /unattend /replicaornewdomain:ReadOnlyReplica /replicadomaindnsname:lucernpub.com /userdomain:LUCERNPUB /username:administrator /password:"P@$$w0rd" /sitename:RemoteLocation /installdns:yes /confirmgc:yes /databasepath:"E:\NTDS" /logpath:"E:\logs" /sysvolpath:"E:\sysvol" /safemodeadminpassword:"P@$$w0rd"
Replace the values in the preceding command line with the values corresponding to your environment.
After promoting a Windows Server installation to a read-only domain controller, it's recommended practice to check for proper promotion. Perform these steps to check:
C:\Windows\Debug\dcpromo.log
C:\Windows\Debug\dcpromoui.log
eventvwr.exe
, new dedicated logs are created for Active Directory Domain Services. Search these logs for any Active Directory-related errors.Read-only domain controllers are different from normal domain controllers in the following ways:
krbtgt
). Additionally, because no Active Directory writes are expected from read-only domain controllers, normal domain controllers don't replicate from them.
For more information, refer to the following recipes:
Change the font size
Change margin width
Change background colour