Hi Sreeram Raju,
To meet your requirements of maintaining the same Hostname/CA Name for CRL/AIA continuity, while keeping the existing CA intact for a rollback, I have compiled the following step-by-step action plan.
Please review the migration phases below:
Phase 1: Pre-Migration Backup (On the existing Server 2019 CA)
Note: We will not uninstall the AD CS role. We are only taking a full backup.
- Create a new staging folder at C:\Temp\CABackup.
- Document Certificate Templates: Open certsrv.msc -> Right-click Certificate Templates -> Export list -> Save to the backup folder.
- (Note: Certificate Templates are stored in Active Directory, not the CA backup. Please take screenshots of the full templates list so we can manually verify them on the new server later).
- Backup CA Database & Keys:
- In certsrv.msc, right-click your CA -> All Tasks -> Back up CA.
- Select both "Private key and CA certificate" and "Certificate database and logs".
- Save it to your backup folder.
- Set a strong password for the private key file. (Critical: Please ensure this password is documented securely, as the backup cannot be restored without it).
- Verify that the database backup contains all 3 required folders.
- Backup CA Registry: Open Registry Editor (regedit) -> Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration-> Right-click Configuration -> Export -> Save the .reg file to your backup folder. - Backup PKI View: Open pkiview.msc -> Right-click your Sub CA -> Export list -> Save to the backup folder.
- Backup Physical CRLs (Optional but recommended): Copy the entire contents of
C:\Windows\System32\CertSrv\CertEnrollto your backup folder. - Safely copy the entire
C:\Temp\CABackupfolder to a network share or directly to the new Server 2022 VM.
Phase 2: Isolate the Old CA & Prepare Active Directory
- Shutdown the Windows Server 2019 CA completely. Do NOT uninstall any roles.
- Log on to a Domain Controller with Domain Admin privileges.
- Open Active Directory Users and Computers (dsa.msc).
- Locate the Computer Object of the CA server.
- Right-click the Computer Object and select Reset Account. (Do NOT delete the object).
Phase 3: Deploy the New CA (On Windows Server 2022)
- Power on the new Windows Server 2022 VM.
- Open sysdm.cpl and rename this server to be identical to your old Server 2019 CA hostname.
- Join the server to the domain using a Domain Admin account and restart. (The new server will take over the reset AD computer account).
- Once rebooted, open Server Manager and install the Active Directory Certificate Services (AD CS) role. Do not configure it yet.
Phase 4: Restore CA Configuration
- Restore Registry: Locate the .reg file in your backup folder, right-click it, and select Merge. (Ensure that the drive letters on the 2022 server match the 2019 server—e.g., if the DB was on the D:\ drive previously, it must be on the D:\ drive now).
- Restore Database & Keys:
- Open certsrv.msc (it may show the service is stopped).
- Right-click the CA node -> All Tasks -> Restore CA.
- Select both "Private key and CA certificate" and "Certificate database and logs".
- Point the wizard to your backup folder, select the
.p12file, and enter the password you set in Phase 1.
- Restart the CA Service: Once the wizard completes, start the Active Directory Certificate Services service.
- Validation: Open pkiview.msc to check the health of the CA and CRL distribution points, and ensure the Certificate Templates populate correctly based on your screenshots.
Rollback Procedure
If the Server 2022 CA encounters issues during validation and you need to abort the migration, perform these steps to revert to the 2019 CA:
- Shutdown the Server 2022 VM.
- On a Domain Controller, open ADUC, right-click the CA's Computer Object, and select Reset Account again.
- Power on the old Server 2019 CA.
- Open an elevated PowerShell prompt on the 2019 CA and run:
-
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
-
- Once the command returns True, restart the 2019 server. This will bring the original CA back online to its pre-migration state.
=========================
If this helps resolve your problem, please consider hitting "Accept Answer" so other users facing this failure can easily find the solution!