Two-Site Domain Consolidation on Windows Server 2022

Our two offices each ran their own Active Directory domain. This project merged them into a single domain, with a new Windows Server 2022 domain controller VM on VMware ESXi in each office, and moved user accounts, Windows 11 Pro laptops, shared data and identity synchronisation across from the old environments.

Before the migration, users existed both as local Active Directory accounts and as Microsoft Entra ID cloud accounts, but the identity path was not cleanly synchronised through the new on-premises directory. The new design aligned on-premises accounts with the existing cloud identities so users could work from one synced identity and one password experience.

ADManager Plus was used for user account migration, attribute matching, account checks, and bulk updates. PowerShell and ManageEngine were used to automate Windows 11 Pro domain joins, while Robocopy was used for shared data migration.

This page describes the project at a high level without exposing internal company details, real domain names, server names, IP addresses, usernames, or file paths.

Overview

Infrastructure Built

  • Windows Server 2022 domain controllers, one per office, on VMware ESXi
  • Active Directory Domain Services
  • Organisational unit structure
  • DNS and DHCP services
  • Active Directory replication validation
  • Microsoft Entra ID synchronisation
  • Windows 11 Pro domain join workflow

Migration Scope

  • 60+ user accounts migrated
  • Shared data migrated with Robocopy
  • User attributes aligned with ADManager Plus
  • Existing cloud identities matched during sync validation
  • Windows 11 Pro laptops joined to the new domain
  • Replication and sync checks completed after key changes
  • Internal documentation created for future reference

Why The Project Was Needed

The environment needed a newer and more structured Windows Server foundation for directory services, network services, user account management, shared data access, endpoint migration, replication health, and cloud identity synchronisation.

Previous State

  • Each office ran its own separate Active Directory domain.
  • Users existed locally and also in Microsoft Entra ID.
  • Local and cloud identity information needed careful matching.
  • Shared data needed a controlled migration process.
  • Windows 11 Pro laptops needed to join the new domain.
  • Internal records needed to reflect the new environment accurately.

Target State

  • One Active Directory domain for both offices, with a Windows Server 2022 domain controller in each.
  • Configured AD DS, DNS, and DHCP services.
  • Cleaner Active Directory structure for users, devices, and groups.
  • On-premises accounts matched with existing Microsoft Entra ID accounts.
  • One synced password experience for local and Microsoft 365 sign-in.
  • Documented process for future internal reference.

Migration Workflow

1. Discovery: reviewed the existing domain, user accounts, cloud identities, Windows 11 Pro laptops, shared data, network services, and identity requirements.

2. Server Build: installed Windows Server 2022 on a VM in each office, added the required roles, and promoted both as domain controllers for the new domain.

3. Directory Design: created a cleaner Active Directory structure for users, departments, computers, groups, disabled accounts, and service accounts.

4. Replication Checks: checked Active Directory replication health so directory changes, DNS records, and domain controller data were consistent before continuing the migration.

5. Identity Alignment: used ADManager Plus to match user attributes between on-premises accounts and existing Microsoft Entra ID users before validating sync.

6. Network Services: configured DNS and DHCP so client devices could resolve domain resources and receive the correct network settings.

7. Data Migration: used Robocopy to migrate shared data, review logs, check folder structure, and validate access after migration.

8. Endpoint Migration: created a PowerShell domain join script and deployed it through ManageEngine to join Windows 11 Pro laptops to the new domain.

9. Cloud Sync Validation: checked Microsoft Entra ID to confirm migrated accounts matched existing cloud identities and did not create duplicate accounts.

10. Documentation: documented the migration approach, key checks, commands, validation steps, decisions, and post-migration notes for internal use.

Windows Server 2022 Domain Controllers

I built a Windows Server 2022 VM on VMware ESXi in each office and configured both as domain controllers for the new domain. This created the foundation for Active Directory, DNS, DHCP, user accounts, computer accounts, shared resource access, replication health checks, and hybrid identity.

Build Tasks

  • Installed Windows Server 2022 on a VM in each office.
  • Prepared the server for domain controller use.
  • Installed Active Directory Domain Services.
  • Promoted both servers to domain controllers.
  • Checked domain health after setup.

Core Services

  • Active Directory Domain Services
  • DNS name resolution
  • DHCP lease assignment
  • User and computer account management
  • Active Directory replication checks
  • Microsoft Entra ID synchronisation

Organisational Unit Structure

The Active Directory structure was organised so users, computers, groups, service accounts, and inactive accounts were easier to manage after migration. The aim was to avoid placing everything in default containers and create a cleaner structure for administration, reviews, and future changes.

Example Sanitised OU Structure

Active Directory • OU Design • Users • Computers • Groups

example.local
├── Domain Controllers
│   ├── DC01
│   └── DC02
│
├── Company
│   ├── Users
│   │   ├── Finance
│   │   ├── HR
│   │   ├── Operations
│   │   ├── Sales
│   │   └── IT
│   │
│   ├── Computers
│   │   ├── Laptops
│   │   ├── Desktops
│   │   └── Shared Devices
│   │
│   ├── Groups
│   │   ├── Department Groups
│   │   ├── File Share Access Groups
│   │   └── Admin Groups
│   │
│   └── Disabled Accounts
│
└── Service Accounts

Design Goals

  • Separate users, computers, groups, and service accounts.
  • Make department-based account placement clearer.
  • Create a predictable location for Windows 11 Pro laptops.
  • Keep inactive accounts away from active accounts.
  • Make future access and account reviews easier.

Objects Organised

  • Domain controllers
  • User accounts
  • Computer accounts
  • Department groups
  • File share access groups
  • Disabled accounts
  • Service accounts

Active Directory Replication and Health Checks

Replication checks were included because directory changes must be consistent across domain controllers before account migration, endpoint migration, and cloud identity synchronisation can be trusted. If replication fails, user accounts, computer objects, DNS records, group membership, and policy-related data can become inconsistent.

Replication health was checked around key changes such as domain controller promotion, OU creation, user account migration, DNS updates, and Windows 11 Pro domain joins.

Areas Checked

  • Domain controller replication status
  • DNS replication consistency
  • SYSVOL and NETLOGON availability
  • User and computer object visibility
  • Group membership consistency
  • Event Viewer replication errors

Reason For The Checks

  • Prevented stale directory information.
  • Reduced risk before joining laptops.
  • Confirmed account changes were visible across the domain.
  • Improved confidence before Microsoft Entra ID sync checks.
  • Made post-migration validation more reliable.

Example Sanitised Replication Commands

Replication • DCDIAG • REPADMIN • DNS • SYSVOL

repadmin /replsummary
repadmin /showrepl
dcdiag /test:replications
dcdiag /test:dns

User Account Migration and Attribute Alignment

User accounts were migrated into department-based organisational units so the new directory reflected how accounts were used across the business. Account attributes were checked carefully because existing Microsoft Entra ID users already existed in the cloud.

ADManager Plus was used to review and update user details so on-premises accounts matched the existing cloud identities. This reduced the risk of duplicate cloud accounts and helped create a cleaner synced identity model.

Example Sanitised User Placement

OU Placement • Department Structure • Account Migration

CN=Example User
OU=Finance
OU=Users
OU=Company
DC=example
DC=local

Attributes Checked

  • Username
  • User principal name
  • Email address
  • Display name
  • Department
  • Job title
  • Manager
  • Group membership

Migration Checks

  • Confirmed accounts were placed in the correct OU.
  • Checked department information after migration.
  • Reviewed group membership.
  • Checked account status.
  • Compared on-premises account details with existing cloud users.
  • Validated synced users in Microsoft Entra ID.

Security Group and Access Structure

Security groups were reviewed and organised so access could be managed through group membership instead of direct user permissions. This created a cleaner access model for shared resources after migration.

Example Sanitised Group Structure

Security Groups • Access Control • File Shares

Groups
├── Department Groups
│   ├── GG_Finance_Users
│   ├── GG_HR_Users
│   ├── GG_Operations_Users
│   └── GG_IT_Users
│
├── File Share Access Groups
│   ├── FS_Finance_Read
│   ├── FS_Finance_Modify
│   ├── FS_Operations_Read
│   └── FS_Operations_Modify
│
└── Admin Groups
    ├── IT_Admins
    └── Server_Admins

Group Review Tasks

  • Reviewed department group membership.
  • Checked file share access groups.
  • Matched migrated users to the correct groups.
  • Reviewed admin group membership.
  • Checked access after migration.

Why This Was Important

  • Reduced direct permission changes.
  • Made access easier to review.
  • Improved consistency across users.
  • Made department access clearer.
  • Created a cleaner access model after migration.

Windows 11 Pro Computer Placement

Windows 11 Pro laptops were joined to the new domain and placed into the correct computer structure in Active Directory. This made migrated devices easier to identify and separated laptops, desktops, and shared devices.

Example Sanitised Computer Placement

Windows 11 Pro • Domain Join • Computer OU

CN=LAP-0001
OU=Laptops
OU=Computers
OU=Company
DC=example
DC=local

Device Migration Tasks

  • Prepared Windows 11 Pro laptops for domain join.
  • Created a PowerShell domain join script.
  • Deployed the script through ManageEngine.
  • Confirmed computer objects appeared in Active Directory.
  • Checked device placement in the correct computer OU.

Post-Join Checks

  • Confirmed domain sign-in worked.
  • Checked DNS settings.
  • Checked DHCP lease assignment.
  • Confirmed shared folder access.
  • Reviewed failed joins and corrected issues.
  • Ran each user's cutover: new credentials, Microsoft 365 reconnection, OneDrive data and bookmarks, and Bitwarden onboarding.

DNS and DHCP Configuration

DNS and DHCP were configured so Windows 11 Pro laptops could locate domain services, resolve names correctly, and receive the correct network configuration.

DNS Tasks

  • Configured DNS zones.
  • Created and checked required DNS records.
  • Confirmed clients used the correct DNS server.
  • Tested name resolution from Windows 11 Pro laptops.

DHCP Tasks

  • Installed the DHCP role.
  • Created DHCP scopes.
  • Configured lease ranges.
  • Added gateway and DNS options.
  • Tested DHCP lease assignment on client devices.

Shared Data Migration with Robocopy

Robocopy was used to migrate shared data from the old server to the new Windows Server 2022 environment. This allowed folder structures, files, and permissions to be copied in a controlled and repeatable way.

Sanitised Robocopy Example

Robocopy • Shared Data • Permissions • Migration Logs

robocopy "\\OLD-SERVER\SharedData" "\\NEW-SERVER\SharedData" /E /COPYALL /R:2 /W:5 /LOG:C:\MigrationLogs\shared-data-migration.log
  • Planned source and destination paths.
  • Ran test copies before the final migration.
  • Migrated shared folders and files.
  • Reviewed Robocopy logs.
  • Checked folder structure and file counts.
  • Tested shared folder access after migration.
  • Corrected permission issues where needed.

PowerShell Domain Join Through ManageEngine

A PowerShell script was created to join Windows 11 Pro laptops to the new domain. The script was uploaded into ManageEngine so the domain join process could be deployed consistently across devices instead of joining every laptop manually.

Sanitised PowerShell Example

PowerShell • Domain Join • ManageEngine • Windows 11 Pro

$DomainName = "example.local"
$OUPath = "OU=Laptops,OU=Computers,OU=Company,DC=example,DC=local"

Add-Computer -DomainName $DomainName -OUPath $OUPath -Restart
  • Created a PowerShell domain join script.
  • Configured the target OU path for laptop placement.
  • Uploaded the script into ManageEngine.
  • Joined Windows 11 Pro laptops to the new domain.
  • Confirmed laptop objects appeared in Active Directory.
  • Verified DNS and DHCP settings after migration.
  • Reviewed failed joins and corrected issues.

Microsoft Entra ID Sync and Password Alignment

Before the migration, users had local Active Directory accounts and Microsoft Entra ID cloud accounts, but the identity relationship needed to be cleaned up through the new on-premises domain controllers. The migration aligned the on-premises accounts with the existing cloud identities before validating sync.

ADManager Plus was used to check and update user attributes such as usernames, user principal names, email addresses, display names, departments, and group membership. Matching these details reduced the risk of duplicate cloud accounts and helped the synced identity model work correctly.

After synchronisation, users could work with a single synced password experience across local domain sign-in and Microsoft 365 services instead of managing separate local and cloud passwords.

Identity Matching Checks

  • Compared local AD users with existing Microsoft Entra ID users.
  • Checked user principal names and sign-in names.
  • Reviewed email addresses and display names.
  • Checked department, job title, and manager fields.
  • Reviewed account status and group membership.
  • Completed bulk attribute updates using ADManager Plus.

Sync Validation

  • Confirmed on-premises accounts matched existing cloud identities.
  • Checked synced user status in the Microsoft Entra admin centre.
  • Verified that duplicate cloud accounts were not created.
  • Confirmed identity details matched between AD and Entra ID.
  • Checked Microsoft 365 sign-in after password alignment.
  • Reviewed sync results after replication checks.

Documentation Created

The migration work was documented for internal reference. The documentation captured the structure of the new environment, key configuration decisions, migration steps, replication checks, identity matching checks, validation checks, and post-migration notes.

Documented Areas

  • Server build notes
  • OU structure
  • User account migration notes
  • Group and access notes
  • Replication and sync checks
  • DNS and DHCP configuration notes
  • Robocopy migration notes
  • Domain join script notes

Why Documentation Mattered

  • Created a reference for future infrastructure changes.
  • Made validation steps repeatable.
  • Recorded migration decisions clearly.
  • Improved handover quality.
  • Reduced reliance on memory after migration.

Testing and Post-Migration Checks

After the migration was completed, the environment was tested to confirm that user accounts, laptops, network services, shared data, replication, identity sync, and password alignment were working correctly.

Technical Validation

  • Confirmed users could sign in to the new domain.
  • Confirmed Windows 11 Pro laptops joined correctly.
  • Tested DNS name resolution.
  • Confirmed DHCP leases were issued correctly.
  • Checked replication health.
  • Reviewed Event Viewer for errors.

Access and Identity Validation

  • Tested shared folder access.
  • Reviewed group membership.
  • Checked Robocopy logs.
  • Confirmed Microsoft Entra ID sync status.
  • Checked cloud identity matching.
  • Reviewed user details after migration.
  • Checked computer objects after domain join.

Project Outcome

The migration was completed for 60+ user accounts across both offices. The new Windows Server 2022 domain controllers provided Active Directory, DNS, DHCP, shared resource access, replication validation, Microsoft Entra ID synchronisation, and Windows 11 Pro domain join automation.

User accounts were aligned with existing Microsoft Entra ID identities, reducing the risk of duplicate cloud accounts and creating a cleaner single-password model. ADManager Plus was used for account migration, attribute matching, and bulk updates. ManageEngine and PowerShell were used to automate endpoint migration.

Operational Improvements

  • Newer Windows Server foundation.
  • Cleaner Active Directory structure.
  • Clearer user account and computer placement.
  • On-premises accounts aligned with existing cloud identities.
  • Replication and sync validation included in the migration process.
  • Documented internal migration process.

Technical Value

  • AD DS, DNS, and DHCP configured and tested.
  • Shared data migrated using Robocopy.
  • 60+ user accounts migrated with attribute checks.
  • Directory replication checked during migration stages.
  • Microsoft Entra ID sync validated against existing cloud accounts.
  • Windows 11 Pro domain joins automated through ManageEngine and PowerShell.

What This Project Demonstrates

This project demonstrates practical infrastructure migration experience across server build, Active Directory design, replication validation, user account migration, identity matching, network services, data migration, endpoint migration, cloud identity synchronisation, internal documentation, and post-migration checks.

It also shows the importance of planning, directory structure, replication health, attribute accuracy, testing, and repeatable processes when moving accounts and devices into a new infrastructure environment.

Skills Demonstrated

Windows Server 2022 • Active Directory • AD DS • OU Design • DNS • DHCP • Active Directory Replication • Microsoft Entra ID • Hybrid Identity • ADManager Plus • ManageEngine • PowerShell • Robocopy • Windows 11 Pro • User Account Migration • Attribute Matching • Security Groups • Domain Join • Shared Data Migration • Internal Documentation • Post-Migration Validation

Back to Projects