Upgrade Domain Controllers To A Newer Version of Windows Server1
Upgrade Domain Controllers To A Newer Version of Windows Server1
The “/replsummary” operation quickly summarizes replication state and relative health of a
forest.
Repadmin /Queue
This command lists elements that are remaining in the replication queue. It displays inbound
replication requests that the Domain Controller needs to issue in order to become consistent with
its source replication partners.
Repadmin /Showrepl
This command displays the replication status when the specified domain controller last attempted
to implement an inbound replication of Active Directory partitions. It helps in figuring out the
replication topology and replication failure.
Step 4 - Synchronize replication between replication partners
Repadmin /syncall
Repadmin /KCC
This command forces the KCC (Knowledge Consistency Checker) on targeted domain
controller(s) to immediately recalculate its inbound replication topology. It checks and creates
the connections between the Domain Controllers. By default KCC runs in the background every
15 minutes to check if a new connection has been established between DCs.
Step 6 - Force replication
Repadmin /replicate
This command forces the replication of the specified directory partition to the destination domain
controller from the source DC.
REPADMIN /KCC
REPADMIN /REHOST
REPADMIN /REPLICATE
REPADMIN /REPLSUM
REPADMIN /SHOWREPL
REPADMIN /SHOWREPS
REPADMIN /SHOWUTDVEC
REPADMIN /SYNCALL
https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/replication-error-
8453
2. From the command prompt type “netdom query fsmo” and hit “enter”.
The above command should return the five roles and which DC they are on.
That’s it for the Netdom query method, very simple and straightforward.
1. Open windows Powershell. On 2012 server click start and type Powershell. Click Windows
Powershell from the search results
I recommend becoming familiar with which DCs in your environment hold the FSMO roles. It’s
good to understand what these roles are and the DCs that hold them in case a disaster does occur
or you have a specific reason to move them.
The process of transferring one or more FSMO roles from one Domain Controller to another is a
fairly easy process. However, given that all DCs are online and are functioning properly.
What happens if a DC, which already has an FSMO role, crashes or shuts down for a long time?
FSMO role transfer cannot be completed as the server is no longer online.
For similar cases, we use a forced transfer of FSMO roles, a process that is referred as ‘seize’.
Seizing FSMO roles from a non-functional DC is the last solution to the problem and means that
the DC will not come back into operation without reinstalling it.
Even if you can restore it (eg after a crash), if you have seized its roles, then it should not come
back to the network because it will cause even more problems in the existing infrastructure.
The FSMO roles can be seized by either PowerShell or NTDSUtil as you will see below.
To seize the RID Master, PDC Emulator, and Infrastructure Master roles, you will need to log in
to DC with Domain Administrator privileges. For Schema Master and Domain Naming Master
roles, you must have Schema Admin and Enterprise Admin permissions respectively.
The command we use is the same we use for the simple transfer, except that we need to add the -
Force switch.
So, for example, to seize the Naming Master role, use the following command.
Where in the -OperationMasterRole switch you can declare one or more FSMO roles separated
by a comma (,). For example:
Then, we will seize the FSMO roles one by one with the corresponding command, as the case
may be. After each Enter appears a confirmation window. Just click Yes to continue.
Also, to mention that, during the seize process, NTDSUtil tries to make a simple transfer first
(which obviously fails) and then proceeds to the forcible transfer.
For the Schema Master role, type seize schema master and press Enter.
For the Domain Naming Master role, type seize naming master and press Enter.
For the RID Master role, type seize rid master and press Enter.
For the PDC Emulator role, type seize pdc and press Enter.
For the Infrastructure Master role, type seize infrastructure master and press Enter.
You can list which domain controllers hold FSMO roles with these two PowerShell commands:
InfrastructureMaster is on DC1
PDCEmulator is on DC2
RIDMaster is on DC2
DomainNamingMaster is on DC1
Schemamaster is on DC1
I want to move all the roles from DC2 to DC1, I’ll demonstrate this below.
You want to log into the server that you will be transferring the roles to, in my case it is DC1.
Transfer PDCEmulator
Move-ADDirectoryServerOperationMasterRole -Identity "dc1" PDCEmulator
Transfer RIDMaster
Move-ADDirectoryServerOperationMasterRole -Identity "dc1" RIDMaster
Transfer InfrastrctureMaster
Move-ADDirectoryServerOperationMasterRole -Identity "dc1" Infrastructuremaster
Transfer DomainNamingMaster
Move-ADDirectoryServerOperationMasterRole -Identity "dc1" DomainNamingmaster
Transfer SchemaMaster
Move-ADDirectoryServerOperationMasterRole -Identity "dc1" SchemaMaster
Now if I re-run the commands to list the FSMO roles I should see them all on DC1.
Yes, I have confirmed all the roles are now on DC1. As you can see moving FSMO roles with
PowerShell is very easy to do.
dcdiag /test:replications
repadmin /showreps
The msDS-Behavior-Version attribute is on the naming context (NC) head for the domain, that
is, DC=corp, DC=contoso, DC=com.
The msDS-Behavior-Version attribute is on the naming context (NC) head for the domain, that
is, DC=corp, DC=contoso, DC=com.
The ntMixedDomain attribute is on the naming context (NC) head for the domain, that is,
DC=corp, DC=contoso, DC=com.
Note
When you increase the msDS-Behavior-Version attribute from the 0 value to the 1 value
by using Adsiedit.msc, you receive the following error message:
Illegal modify operation. Some aspect of the modification is not permitted.
https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/raise-active-
directory-domain-forest-functional-levels?source=recommendations
Note
Beginning with Windows Server 2012 R2, File Replication Service (FRS) is deprecated. A new
domain that is created on a domain controller that runs at least Windows Server 2012 R2 must be
set to the Windows Server 2008 domain functional level or higher.
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/active-directory-functional-
levels
https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/deploy/upgrade-domain-
controllers
Windows Server 2003 and 2003 R2 uses File Replication Service (FRS) to replicate SYSVOL
folder content to other domain controllers. But Windows server 2008 and later uses Distributed
File System (DFS) for the replication. DFS is more efficient than FRS. Since windows server
2003 is going out of support, most people already done or still looking for migrate in to latest
versions. However migrating FSMO roles WILL NOT migrate SYSVOL replication from FRS
to DFS. Most of the engineers forget about this step when they migrate from windows 2003 to
new versions.
For FRS to DFS migration we uses the Dfsrmig.exe utility. More info about it available on
https://technet.microsoft.com/en-au/library/dd641227(v=ws.10).aspx
For the demo I am using windows server 2012 R2 server and I migrated FSMO roles already
from a windows server 2003 R2 server.
In order to proceed with the migration forest function level must set to windows server 2008 or
later. So if your organization not done this yet first step is to get the forest and domain function
level updated.
You can verify if the system uses the FRS using dfsrmig /getglobalstate , To do this
1) Log in to domain controller as Domain admin or Enterprise Admin
2) Launch powershell console and type dfsrmig /getglobalstate. Output explains it’s not
initiated DFRS migration yet.
Before move in to the configurations we need to look into stages of the migration.
There are four stable states going along with the four migration phases.
1) State 0 – Start
2) State 1 – Prepared
3) State 2 – Redirected
4) State 3 – Eliminated
State 0 – Start
With initiating this state, FRS will replicate SYSVOL folder among the domain controllers. It is
important to have up to date copy of SYSVOL before begins the migration process to avoid any
conflicts.
State 1 – Prepared
In this state while FRS continues replicating SYSVOL folder, DFSR will replicate a copy of
SYSVOL folder. It will be located in %SystemRoot%\SYSVOL_DFRS by default. But this
SYSVOL will not response for any other domain controller service requests.
State 2 – Redirected
In this state the DFSR copy of SYSVOL starts to response for SYSVOL service requests. FRS
will continue the replication of its own SYSVOL copy but will not involve with production
SYSVOL replication.
State 3 – Eliminated
In this state, DFS Replication will continue its replication and servicing SYSVOL requests.
Windows will delete original SYSVOL folder users by FRS replication and stop the FRS
replication.
In order to migrate from FRS to DFSR its must to go from State 1 to State 3.
Prepared State
4. Type dfsrmig /getmigrationstate to confirm all domain controllers have reached prepared
state
Redirected State
Eliminated State
4. Type dfsrmig /getmigrationstate to confirm all domain controllers have reached eliminated
state
This completes the migration process and to confirm the SYSVOL share, type net share
command and enter.
Also make sure in each domain controller FRS service is stopped and disabled.
https://www.checkyourlogs.net/how-to-fix-missing-sysvol-and-netlogon-share-and-replication-
issues-on-new-domain-controller-at-azure/
The most common values for the BurFlags registry key are:
You can also perform BurFlags restores at the same time as you restore data from backup or
from any other known good source, and then restart the service.
To perform a nonauthoritative restore, stop the FRS service, configure the BurFlags registry
key, and then restart the FRS service. Follow these steps:
https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/use-burflags-to-
reinitialize-frs