Migrate Active Directory to Windows 2012 R2 – pt. 3

upgradeadto2012versionpt3_01

Final steps to migrate Active Directory to Windows 2012 R2 include the decommission of the first 2008 R2 DC migrating the DHCP to the new Windows Server 2012 R2 .

If the old Domain Controller is acting also as DHCP server, the DHCP role should be migrated to the new server 2012 R2 in order to keep same settings.

 

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

 

Export DHCP settings

If your primary old Domain Controller has the DHCP role installed, before the decommission we need to migrate the DHCP configuration to the new 2012 R2 server.

Login to the Windows Server 2012 R2 previously deployed (DC01) and open the PowerShell shell.

upgradeadto2012versionpt3_02

Run the following command to export DHCP settings:

Export-DhcpServer –ComputerName server.domain.com -Leases -File path\dhcpconfig.xml -verbose

PS C:\> Export-DhcpServer –ComputerName w2k8r2-dc01.nolabnoparty.local -Leases -File C:\temp\dhcpconfig.xml -verbose

upgradeadto2012versionpt3_03

Exit the PowerShell. The exported dhcpconfig.xml file contains the configuration of current DHCP server.

upgradeadto2012versionpt3_04

 

Decommission last 2008 R2 Domain Controller

To decommission the last 2008 R2 Domain Controller, we have to follow the same procedure used in part 1 – Decommission secondary Windows 2008 R2 DC.

From the Windows 2008 R2 Domain Controller run the dcpromo command and follow the steps to demote the server.

upgradeadto2012versionpt3_05

Deploy a new 2012 R2 server and promote it as Domain Controller following the same procedure used in part 2 – Deploy the first Windows 2012 R2 DC.

DON’T check the Delete the domain because this server is the last domain controller in the domain option and click Next to proceed.

upgradeadto2012versionpt3_06

Click Yes to continue.

upgradeadto2012versionpt3_07

Type a Password then click Next.

upgradeadto2012versionpt3_08

Click Next to start demoting the Windows 2008 R2 Domain Controller.

upgradeadto2012versionpt3_09

The demoting process takes place. The server reboots automatically.

upgradeadto2012versionpt3_10

When the server has rebooted, remove demoted DC from the domain.

upgradeadto2012versionpt3_11

Check the computer has been disabled in Active Directory.

upgradeadto2012versionpt3_12

This server won’t be used anymore, shutdown the VM.

upgradeadto2012versionpt3_13

If you want to keep same IP address of old Domain Controller, change the IP in the new Windows 2012 R2 Domain Controller. When done, reboot the VM.

upgradeadto2012versionpt3_14

When the server has restarted, from Server Manager select Tools > Active Directory Users and Computers. Expand the domain name and select Domain Controllers. In the right pane the new Domain Controller shows up.

upgradeadto2012versionpt3_15

To verify the DNS functionality, from Server Manager select Tools > DNS. Expand the server name and Forward Lookup Zones. Right click the domain name and select Properties. Ensure DC is listed in the Name Servers tab.

upgradeadto2012versionpt3_16

 

Import DHCP settings

If your primary Domain Controller has the DHCP role installed, we need to restore the DHCP configuration previously exported from the old 2008 R2 server to keep leases consistency.

Login to the Windows 2012 R2 (DC01) and open the PowerShell shell.

upgradeadto2012versionpt3_17

Run the following command to import DHCP settings:

Import-DhcpServer –ComputerName server.domain.com -Leases -File path\dhcpconfig.xml -BackupPath C:\temp\dhcp_backup\ -verbose

PS C:\>Import-DhcpServer -ComputerName w12r2-dc01.nolabnoparty.local -Leases -File C:\temp\dhcpconfig.xml -BackupPath C:\temp\dhcp_backup\ -verbose

Type Y to proceed with import.

upgradeadto2012versionpt3_18

The configuration is imported.

upgradeadto2012versionpt3_19

Open the DHCP snap-in, right click the server name and select Authorize option.

upgradeadto2012versionpt3_20

The imported scope is now active on the new 2012 R2 server.

upgradeadto2012versionpt3_21

The migration procedure is complete. Check the Active Directory health status running same script used at the beginning of the migration to be sure no issues are detected.

 

Troubleshooting

A common issue faced during the migration is the missing SYSVOL and NETLOGON shares in the new 2012 R2 DCs after their promotion.

Check the shares availability using the command:

C:\>net share

upgradeadto2012versionpt3_22

To fix this problem is necessary to force an authoritative and non-authoritative synchronization for replicated SYSVOL. Several procedures are available in Internet to guide you through the synchronization process.

upgradeadto2012versionpt3_23

When the shares are available again, the migration can be considered completed.

firma