Hey Checkyourlogs Fans,
This week at the TechMentor 2018 Redmond conference we had some great discussions around Migrating your Windows Roles for example from 2003 to 2012 R2 and beyond. I had mentioned that we have a documents that we have used successfully at many clients and I wanted to get it out there to our attendees and friends.
This is the process from 2003 – 2012 R2 but it really doesn’t change much moving over to 2016 or 2019. I will update with a later blog post with the 2016 and 2019 process later as this documented process is already complete and I know works 100 %.
This was copied straight from one of our Method of Procedure documents just for you.
I really hope this helps you out on your Migration journey to Server 2016 and the future Server 2019 coming out hopefully later this year.
Dave
Active Directory Preparation
Backing up the existing Directory Services
As a change will be made to the existing Schema Partition, we will require a full backup operation prior to the execution of this RFC. Normal backup procedures will suffice and it is an imperative step because the rollback plan requires this.
- Login to windows 2003 domain server
- Launch the Backup program
- Back up the System State to D:\Srvsup\Sysback\(windows 2003 domain server name).BKF
- Copy D:\Srvsup\Sysback\(windows 2003 domain server name).BKF to share storage of server.
Verifying Healthy Replication
- Logon to windows 2003 domain server.
- Open a command prompt.
- Type repadmin /replsum /bysrc /bydest /sort:delta >c:\repltest.txt.
- Open c:\repltest.txt and verify that no errors exist.
- If errors exist “DO Not Proceed with the ADPREP” these need to be cleaned up prior to the change.
- Return to the command prompt.
- Type dcdiag.exe /e /test:frssysvol >c:\frstest.txt.
- Open c:\frstest.txt and verify that no errors exist.
- If errors exist “DO Not Proceed with the ADPREP” these need to be cleaned up prior to the change.
- Return to the command prompt
- Type dcdiag /test:fsmocheck >c:\fsmocheck.txt
- If errors exist “DO Not Proceed with the ADPREP” these need to be cleaned up prior to the change.
- Return to the command prompt.
- Type repadmin /SHOWREPS (Windows 2003 Domain server name) >c:\Showreps (Windows 2003 Domain server name).txt
- If errors exist “DO Not Proceed with the ADPREP” these need to be cleaned up prior to the change
Raise Forest Function Level
The minimum functional level must be at least Windows Server 2003.
- Logon to windows 2003 domain server.
- Open Active Directory Domains and Trusts.
- In the console tree, right-click the Active Directory Domains and Trusts node, and then click Raise Forest Functional Level.
- In Select an available forest functional level, click Windows Server 2003, and then click Raise
Raise Domain Function Level
- Logon to windows 2003 domain server.
- Open Active Directory Domains and Trusts.
- Right click on the Domain name, and then click on Raise Domain Functional Level….
- If you see screen like this (Windows 2003 mode), it means that you do not need to raise your Domain Functional Level.
Forest /Domain Preparation of Process
In previous versions we need to prepare environment using adprep command to extend schema and configure Infrastructure Master. From Windows Server 2012 and later we don’t have to run adprep first. Windows Server 2012 and later will do that for you if it will detect that adprep was not used before for Schema and Infrastructure preparation
-
Disable Outbound Replication from windows 2003 dmain server during the Forestprep and Domain Prep Process.
- From the Command prompt type repadmin /options sktd01 +DISABLE_OUTBOUND_REPL
Note We do not want windows 2003 domain server to start replication half way through the Schema Extension process. Once we have completed and verified the Schema Extensions we will re-enable outbound replication for windows 2003 domain server. |
Install windows 2012 R2 domain server
- Build a new Windows 2012 R2 Server (Make sure you fully patch it).
- Logon to windows 2012 R2 Server – The account used to logon must have “Domain Admins” rights.
- Ensure that DNS is configured to windows 2003 domain controller server.
- Join it to the Domain.
- Open the Server Manager console and click on Add roles and features.
- Select Role-based of featured-based installation and select Next.
- Select the Active Directory Domain Services, DHCP Server and file services (including De-Duplication) roles.
- Accept the default features required by clicking the Add Features button.
- On the Features screen click the Next button.
- On the Confirm installation selections screen click the Install button.
- Click the Close button once the installation has been completed.
Forest /Domain Verification of Process
- Logon to windows 2003 domain server.
- Click Start, click Run, type ADSIEdit.msc, and then click OK.
- Click Action, and then click Connect to.
- Click Select a well known Naming Context, select Configuration in the list of available naming contexts, and then click OK.
- Double-click Configuration, and then double-click CN=Configuration,DC=forest_root_domain.
- Double-click CN=ForestUpdates.
- Right-click CN=ActiveDirectoryUpdate, and then click Properties.
- Confirm that the revision attribute value is correct for the version of adprep /forestprep, and then click OK.
Note
|
- Click ADSI Edit, click Action, and then click Connect to.
- Click Select a Well known naming context, select Schema in the list of available naming contexts, and then click OK.
- Right-click CN=Schema,CN=Configuration,DC=forest_root_domain, and then click Properties.
- Confirm that the objectVersion attribute value is correct for the version of adprep /forestprep, and then click OK.
Note
|
-
Now that we have successfully verified the Schema Extensions on windows 2003 domain server we can re-enable the outbound replication:
-
From the Command prompt type
repadmin /options (windows 2003 domain server name) -DISABLE_OUTBOUND_REPL
-
Force Replication and Convergence
Once the Schema Extensions have been successfully applied to windows 2003 domain controller server they need to be replicated to the rest of the domain controllers in the forest. This can be done manually by following the steps below
- Logon to windows 2003 domain controller server.
- Type repadmin /kcc.
- Type repadmin /syncall /e /d /a >c:\postrootschema-repl-Pull.txt.
- Open c:\postrootschema-repl-Pull.txt – Ensure that at the bottom of the file “SyncAll terminated with no errors” exists – If there are errors – These must be fixed before proceeding.
- Type repadmin /syncall /e /d /a /P >c:\postrootschema-repl-Push.txt.
- Open c:\postrootschema-repl-Push.txt – Ensure that at the bottom of the file “SyncAll terminated with no errors” exists – If there are errors – These must be fixed before proceeding.
File Server Migration
Robocopy to mirror folers and permissions
- Logon to windows 2003 domain controller server.
- Run net share and view all of the current shared folders.
- Review the Permissions and decided which folders to take over to the new server.
Note
|
- Using the RoboCopy command below will mirror the permissions.
- Logon to Windows 2012 R2 server.
- Configure a RoboCopy script to mirror all of the desired folders to the new server.
Robocopy “\\<OldServer>\client service advisors” “f:\Client Service Advisors” /MIR /SEC /SECFIX /R:5 /W:15 /MT:12 /V /NP /LOG:f:\RoboCopySync_<OldServer>_clientserviceadvisor.log
Robocopy “\\<Old Server>\client services” “f:\Client services” /MIR /SEC /SECFIX /R:5 /W:15 /MT:12 /V /NP /LOG:f:\RoboCopySync_<OldServer>_clientservices.log
Robocopy “\\<Old Server>\corporate client services” “f:\corporate Client services” /MIR /SEC /SECFIX /R:5 /W:15 /MT:12 /V /NP /LOG:f:\RoboCopySync_<OldServer>_corporateclientservices.log
Robocopy “\\<Old Server>\pdf-reports” “f:\pdf-reports” /MIR /SEC /SECFIX /R:5 /W:15 /MT:12 /V /NP /LOG:f:\RoboCopySync_<OldServer>_hrs-pdf-reports.log
Note We normally check the log files generated by this script to check for open files. Normally it can take a few days to fully Sync everything up. |
- Setup the Shares and Share Permissions on the new Windows 2012 R2 Server.
Disable Strict Name Checking
- Logon to Windows 2012 R2 server.
- Run regedit and expand the following key: HKLM\System\CurrentControlSet\Services\LanmanServer\Parameters.
- Create a new DWORD (32-bit) Value of DisableStrictNameChecking.
- Set the Value to 1.
Note We use the above setting to help us steal the name of the old server by the creation of a CNAME record that points to the new Windows 2012 R2 Server. |
Export DHCP database and DNS Configuration
Export DHCP Database
- Logon to windows 2003 domain controller server.
- Stop the DHCP Server Service.
- Copy the DHCP Database from the from Windows 2003 (%windir%\system32\dhcp\dhcp.mdb) to windows 2012 r2 Server.
- Make sure you only grab the DHCP Database and not the associated log files.
Note This will take all of the associated Scopes from the old server to the new one. It is a complete cutover. If you need to take individual scopes you should use netsh or the Server Migration Toolkit. |
Export the DNS Configuration for all of the Standard Primary and Secondary Zones (Forward and Reverse)
- Logon windows 2003 domain server.
- Export the DNS Registry keys (HKLM\Software\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones).
- Copy *.dns from %windir%\system32\dns.
IP Address SWAP
- Logon windows 2003 domain server.
- Demote the old Windows 2003 Domain Controller using DCPromo.exe.
- Rename the old Windows 2003 Server (which is now a member server) to <ServerName>-Old.
- Note the IP Address of <ServerName>-Old and change the IP Address.
- DNS Create a CName Record in DNS that points the old Windows 2003 Server to the name of the new Windows 2012 R2 Server.
- Logon to the new Windows 2012 R2 Server.
- Change the IP Address to the IP Address of the old Windows 2003 Domain Controller.
Note This is a very important step because if clients or servers are configured to use the old windows 2003 Server for DNS this will allow for a seamless transition. |
Server Roles Migration
Promote windows 2012 R2 server as Replica Domain Controller
- Logon to the new Windows 2012 R2 Server.
- On the Server Manager, notification is made available on the dashboard highlighted by an exclamation mark. Select it and amidst the drop down menu select Promote this server to a domain controller.
- Select add a Domain Controller into existing domain.
- Ensure the target domain is specified. If it is not, please either Select the proper domain or enter the proper domain in the field provided.
- Click Change, provide the required Enterprise Administrator credentials and click the Next button.
- Define if server should be a Domain Name System DNS server and Global Catalog (GC). Select the Site to which this DC belongs to and define Directory Services Restoration Mode (DSRM) password for this DC.
- Click the Next button on the DNS options screen.
- In the Additional Options screen you are provided with the option to install the Domain Controller from Install From Media (IFM). Additionally you are provided the option to select the point from which DC replication should be completed. The server will choose the best location for AD database replication if not specified. Click the Next button once completed.
- Specify location for AD database and SYSVOL and Click the Next button.
- Next up is the Schema and Domain preparation. Alternately, one could run Adprep
prior to commencing these steps, regardless, if Adprep is not detected, it will automatically be completed on your behalf. - Finally, the Review Options screen provides a summary of all of the selected options for server promotion. As an added bonus, when clicking View Script button you are provided with the PowerShell script to automate future installations. To click the Next button to continue.
- Should all the prerequisites pass, click the Install button to start the installation.
- Validate Active Directory DNS Zones are created.
- Validate AD Replication is working via the KCC (Knowledge Consistency Checker).
- Ensure there are not any errors in the event logs.
Migrate DHCP Server Role
- Logon to the new Windows 2012 R2 Server.
- Delete all of the existing database files including logfiles from %windir%\system32\dhcp.
- Copy the old DHCP Database from c:\export\dhcp\dhcp.mdb to %windir%\system32\dhcp.
- Start the DHCP Server and Authorize the DHCP Server.
- You should have all of the scopes from the old server including their leases now.
Migrate DNS Server Role
- Logon to the new Windows 2012 R2 Server.
- Import the Registry key from c:\export\dns\zones.reg.
- Copy all of the *.dns files from c:\export\dns (from the old windows 2003 domain controller) to %windir%\system32\dns.
- Restart the DNS Service.
- Validate that all of the Standard Primary and Secondary (Forward and Reverse) lookup zones are there.
Migrate Printer Server Role
- Logon to the old windows 2003 printer server.
- Download and install x64 driver for each printer on the windows 2003 server.
Note If the 64 bit driver is missing the Printer Migration Wizard will fail. |
- Logon to the new Windows 2012 R2 Server.
- Open Server Manager and click All Servers in the navigation pane.
- Click Manage in the Menu Bar and then click Add Roles and Features.
- Click Next, select Role or feature-based Installation, and then click Next.
- On the Select destination server page, select the server to install the Print and Document Services on. The default server is the local server. Then click Next.
- Click Next on the Select features page.
- On the Print and Document Services page, review the notes for the administrator and then click Next.
- On the Select role services page, choose the role services that you wish to install. By default, Print Server is selected automatically.
- Click Next until the Confirm installation selections page is displayed. Click Install to install the required role services.
- Open Print Management.
- In left pane, click Print Servers, right-click the print server that contains the printer queues that you want to export, and then click Export printers to a file. This starts the Printer Migration Wizard.
- On the Select the file location page, specify the location to save the printer settings, and then click Next to save the printers.
- Right-click the destination computer on which you want to import the printers, and then click Import printers from a file. This launches the Printer Migration Wizard.
- On the Select the file location page, specify the location of the printer settings file, and then click Next.
- Click Next to import the printers..
Validate
- Validate that you can browse the UNC Path of \\<oldserver>\<share> using the new CNAME.
- Validate that you can browse the UNC Path of \\<newserver>\<share> using the name of the new Windows 2012 R2 Server.
- Validate that DNS and DHCP are working properly.
- Shut down the old Windows 2003 Server.
Note We normally don’t delete the virtual machine or remove the physical server for at least a few months. |