How to Prepopulate Password on Read-Only Domain Controller Windows Server 2016 Using PowerShell

Last Updated on July 18, 2017 by admin

If a password replication policy (PRP) is configured and the branch users are added into an allowed password replication group, their passwords are cached on Read-Only Domain Controller when they login to computers at the branch office. However, you can prepopulate their passwords before they login using PowerShell.

Prepopulate Password on Read-Only Domain Controller

Step 1. Open PowerShell with elevated privileges

Step 2. Execute the following script. This will populate the passwords of all users from branch users OU.

$users = Get-ADUser -SearchBase "OU=Branch Users,dc=yourdomain,dc=com" -Filter *

foreach ($user in $users) {
Get-ADObject -identity $user | Sync-ADObject -Source SERVER2016 -Destination SRV-02RODC -PasswordOnly

To confirm the prepopulated passwords, execute the following cmdlet.

Get-ADDomainControllerPasswordReplicationPolicyUsage -Identity "<SRV-02>" -RevealedAccounts | ft Name,ObjectClass.

Above command when executed will return the password of all users stored on RODC.

Leave a Comment