Migrating Active Directory to Windows 2012 R2, all Domain Controllers have to be migrated to Server version 2012 R2 following a specific procedure.
The Domain Controllers to migrate are installed with Windows Server 2008 R2 and before begin the procedure, check you have a full working backup of your environment.
Blog series
Migrate Active Directory to Windows 2012 R2 - pt. 1
Migrate Active Directory to Windows 2012 R2 - pt. 2
Migrate Active Directory to Windows 2012 R2 - pt. 3
Check Domain Controllers health status
Before starting the migration, check DCs health status in order to be sure that current configuration is working with no issues.
To check DCs you can use a simple script to stores the results into files to be further analyzed.
@echo off cls echo. echo --------------------------- echo Test ACTIVE DIRECTORY echo --------------------------- echo. echo. echo Testing DNS echo --------------------------- dcdiag /TEST:DNS /v >> c:\temp\ad01_dns.txt echo. echo. echo Testing DHCP echo --------------------------- netsh dhcp show server >> c:\temp\ad02_dhcp.txt echo. echo. echo Testing Domain Controllers echo --------------------------- dcdiag /a /v /c >> c:\temp\ad03_dc.txt echo. echo. echo Testing Replica echo --------------------------- repadmin /showrepl >> c:\temp\ad04_replica.txt echo. echo. echo Replica Summary echo --------------------------- repadmin /replsummary >> c:\temp\ad05_replica_sum.txt echo. echo. echo Show Replica Errors echo --------------------------- repadmin /replsum /errorsonly >> c:\temp\ad06_replica_err.txt repadmin /options * >> c:\temp\ad07_replica_opt.txt pause exit
How results are displayed running the commands from the Command Prompt.
If the tests don't detect any error, the migration can safely begin.
Prepare Active Directory Schema
From one of your Domain Controller mount the Server 2012 R2 installation disc using the VMware Web Client.
Select the Windows Server 2012 R2 installation media then click OK.
Enable the connection to the CD for the Domain Controller then click OK.
From the Domain Controller, check the Windows Server 2012 R2 installation media is accessible.
Open the Command Prompt with administrative privileges and navigate to \support\adprep on the installation media.
D:\>cd \support\adprep
We need to upgrade the Active Directory Schema version to Windows 2012 R2. Run the command adprep /forestprep.
D:\support\adprep>adprep /forestprep
Type C to begin the process.
Now run the command adprep /domainprep.
D:\support\adprep>adprep /domainprep
To verify if the schema version has been updated successfully, open the Registry Editor and navigate to:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\NTDS\Parameters
The Schema Version REG_WORD value should be 69.
The Active Directory preparation schema process is now complete.
Decommission secondary Windows 2008 R2 DC
From the secondary Domain Controller, click Start > Run and type the command dcpromo.
The system checks the AD environment.
When the Installation Wizard window appears, click Next to continue.
Since this DC has the Global Catalog service installed, before demoting make sure the primary DC has the GC service enabled as well. Click OK.
To check if the primary DC has the Global Catalog service enable, open Active Directory Sites and Services. Expand Sites and navigate to Default-First-Site-Name > Servers. Right click first DC and select Properties option.
In General tab check if Global Catalog option is checked. In this example also the primary DC has the GC service enabled.
DON'T check the Delete the domain because this server is the last domain controller in the domain option and click Next.
Type the Password for the Local Administrator account then click Next.
From the Summary window, click Next to begin the operation.
The Domain Controller is being demoted. Check the Reboot on completion option to restart the server automatically.
Remove roles
After the server has rebooted, access the server Roles from the Server Manager and click Remove Roles.
The Remove Role Wizard starts. Click Next to continue.
Clear the check boxes for the roles to remove.
Click Next when done.
Click Remove to proceed with removal.
The removal process is being executed.
Click Close to exit the Wizard.
Click Yes to restart the server now.
After rebooting the server the Configuration Wizard resumes the configuration to complete the removal process.
Components are being removed from the system.
When the removal has completed, click Close to exit the Wizard.
Disjoin server from domain
Since the server won't be used anymore, the demoted Domain Controller must be disjoined from domain. From the Server Manager click Change System Properties.
In Computer Name tab click Change. Select Workgroup option and type a name to assign then click OK to confirm.
Click OK to continue.
The server is disjoined from the domain. Click OK.
Click OK.
Click Close.
Since we no longer need this server, click Restart Later.
Shutdown the server from Start > Shutdown.
The procedure to decommission the secondary Domain Controller has been completed. Part 2 of the procedure will cover the deployment of new 2012 R2 Domain Controllers transferring the FSMO Roles.