-
Notifications
You must be signed in to change notification settings - Fork 0
Check ADMTPrerequisites
PowerShell script that validates environment readiness for Active Directory Migration Tool (ADMT) migrations. Performs comprehensive prerequisite checks including domain functional levels, trust relationships, network connectivity, permissions, and optional SID History and Password Export Server (PES) requirements.
This script helps identify and resolve issues before starting an ADMT migration project, reducing migration failures and downtime.
- DNS Resolution Validation - Verifies both source and target domains are resolvable
- Domain Functional Level Checks - Ensures domains meet minimum requirements
- Trust Relationship Analysis - Validates trust type, direction, and configuration
- Permission Verification - Confirms current user has necessary administrative rights
- Network Connectivity Testing - Tests critical AD ports (LDAP, Kerberos, SMB, RPC, etc.)
- SID History Prerequisites - Optional validation for SID History migration requirements
- Password Export Server (PES) Checks - Optional PES installation and configuration validation
- SQL Server Detection - Identifies SQL Server instances for ADMT database
- ADMT Installation Status - Checks if ADMT is already installed
- Detailed Reporting - Color-coded console output and CSV export with remediation steps
- PowerShell: 5.1 or later
-
Required Modules:
- ActiveDirectory (RSAT Tools)
-
Permissions:
- Domain Admin in target domain (recommended)
- Read access to source domain
- Ability to query both source and target domains
-
Network:
- Connectivity to domain controllers in both domains
- DNS resolution for both domains
-
SourceDomain: FQDN of the source domain (domain you're migrating FROM)
- Example:
"old.contoso.com","legacy.fabrikam.com"
- Example:
-
TargetDomain: FQDN of the target domain (domain you're migrating TO)
- Default: Current domain (Get-ADDomain).DNSRoot
- Example:
"new.contoso.com"
-
CheckSIDHistory: Switch parameter to include SID History prerequisite checks
- Validates auditing, connectivity to source PDC, and special group creation
- Example:
-CheckSIDHistory
-
CheckPES: Switch parameter to check Password Export Server requirements
- Validates PES installation prerequisites
- Example:
-CheckPES
-
SourcePDC: FQDN of source domain PDC Emulator
- Required when using
-CheckSIDHistory - Example:
"dc01.old.contoso.com"
- Required when using
.\Check-ADMTPrerequisites.ps1 -SourceDomain "old.contoso.com" -TargetDomain "new.contoso.com"Performs core prerequisite checks for ADMT migration between two domains.
.\Check-ADMTPrerequisites.ps1 -SourceDomain "old.contoso.com" -TargetDomain "new.contoso.com" -CheckSIDHistory -SourcePDC "dc01.old.contoso.com"Includes SID History prerequisites with connectivity tests to source PDC.
.\Check-ADMTPrerequisites.ps1 -SourceDomain "legacy.fabrikam.com" -CheckPES -CheckSIDHistory -SourcePDC "pdc.legacy.fabrikam.com"Complete prerequisite check including Password Export Server requirements.
.\Check-ADMTPrerequisites.ps1 -SourceDomain "old.domain.com"Checks migration to current domain (useful when running from target domain controller).
- Source Domain DNS: Verifies source domain FQDN resolves to IP addresses
- Target Domain DNS: Verifies target domain FQDN resolves to IP addresses
- Purpose: Ensures basic network connectivity and name resolution
- Target Domain Level: Reports target domain functional level
- Target Forest Level: Reports target forest functional level
- Source Domain Level: Validates source meets minimum (Windows 2000 Native)
- Purpose: ADMT requires minimum functional levels for proper operation
- Trust Existence: Verifies trust relationship exists between domains
- Trust Direction: Validates trust direction (BiDirectional optimal, Outbound sufficient)
- Trust Type: Reports trust type (External, Forest, etc.)
- Purpose: Target must trust Source for ADMT to read source objects
- Target Domain Admin: Verifies current user is Domain Admin in target
- Source Domain Read: Confirms read access to source domain objects
- Purpose: ADMT requires admin rights in target and read rights in source
- Auditing Configuration: Validates account management auditing on source PDC
- TCP Port 138: Tests connectivity to source PDC on port 138 (NetBIOS)
-
Special Group: Documents requirement for
$SourceDomain$$$group on source PDC - Purpose: SID History migration requires specific source domain configuration
- PES Installation Location: Confirms PES must be on source domain DC
- Encryption Key: Documents 128-bit key requirement
- Purpose: Password migration requires PES installation on source domain
Tests critical Active Directory ports to target domain controller:
- Port 389: LDAP
- Port 636: LDAPS (secure LDAP)
- Port 3268: Global Catalog
- Port 88: Kerberos
- Port 135: RPC Endpoint Mapper
- Port 445: SMB (file sharing)
- Purpose: ADMT requires multiple AD protocols for migration operations
- SQL Server Detection: Checks for existing SQL Server installations
- SQL Server Express: Notes that ADMT can install SQL Express if needed
- Purpose: ADMT requires SQL Server for migration database
- Installation Directory: Checks for C:\Windows\ADMT directory
- Registry Keys: Verifies ADMT registration in system
- Purpose: Determines if ADMT is already installed
Color-coded results displayed in terminal:
- π’ PASS (Green): Check passed successfully
- π΄ FAIL (Red): Critical issue requiring resolution
- π‘ WARNING (Yellow): Non-critical issue or potential problem
- π΅ INFO (Cyan): Informational message
Each failed check includes:
- Description of the issue
- Remediation steps to resolve the problem
Automatically exports results to timestamped CSV file:
-
Filename Pattern:
ADMT_Prerequisites_YYYYMMDD_HHmmss.csv - Columns: Check, Status, Message, Remediation
- Location: Current directory
Final summary shows:
- Total checks performed
- Count of PASS, FAIL, WARNING, and INFO results
- List of all failed items requiring attention
- Path to exported CSV file
Symptoms: Cannot resolve source domain FQDN
Solution:
- Verify DNS server configuration on ADMT server
- Add conditional forwarders for source domain
- Test with
nslookup source.domain.com - Check firewall allows DNS (UDP/TCP 53)
Symptoms: Trust check fails with "No trust relationship found"
Solution:
- Establish trust between domains (minimum: target trusts source)
- For full functionality, create two-way trust
- Verify trust with:
Get-ADTrust -Filter * -Server target.domain.com - Use Active Directory Domains and Trusts MMC snap-in
Symptoms: Cannot read from source domain
Solution:
- Ensure account has at least read permissions in source domain
- Add account to source domain's Domain Users group (minimum)
- For password migration, account needs additional source domain rights
- Consider using dedicated migration account with proper permissions
Symptoms: Multiple port checks fail to target DC
Solution:
- Check firewall rules between ADMT server and target DC
- Verify Windows Firewall on target DC allows inbound connections
- Test manually:
Test-NetConnection -ComputerName targetdc.domain.com -Port 389 - Review any network security groups or hardware firewalls
Symptoms: Cannot connect to TCP port 138 on source PDC
Solution:
- Enable NetBIOS on source PDC
- Open TCP port 138 in firewalls
- Verify source PDC hostname/IP is correct
- Consider using
-SourcePDCparameter with PDC FQDN
Symptoms: Source domain level below Windows 2000 Native
Solution:
- Raise source domain functional level:
Set-ADDomainMode -Identity "source.domain.com" -DomainMode Windows2003Domain
- Ensure all DCs support higher functional level first
- Cannot be reversed - verify compatibility before raising
Use this script as part of your ADMT migration preparation:
- β
Run Check-ADMTPrerequisites.ps1 with
-CheckSIDHistoryand-CheckPES - β Resolve all FAIL status items
- β Review and address WARNING items
- β Document current configuration (export CSV for records)
- β Obtain necessary credentials (Domain Admin in target, read access in source)
- β Establish minimum trust (target trusts source)
- β
Verify trust with
nltest /trusted_domains - β
Test trust authentication:
runas /netonly /user:source\username cmd
- β Enable auditing on source domain PDC
- β Verify TCP port 138 connectivity
- β
Run first migration to create
$SourceDomain$$$group
- β Install Password Export Server on source domain DC
- β Generate and securely store encryption key
- β Configure PES service account
- β Install SQL Server (or allow ADMT to install SQL Express)
- β Install ADMT on target domain member server
- β Create ADMT migration database
- β Configure ADMT service account
- β Re-run Check-ADMTPrerequisites.ps1
- β Perform test migration with pilot group
- β Validate migrated objects and permissions
- β Document migration procedures
- Get-ComprehensiveADReport - Assess source and target AD environments before migration
- Start-FileShareAssessment - Assess file shares that may need permission updates post-migration
- Run this script weeks before planned migration
- Re-run after resolving issues to verify fixes
- Run immediately before migration window as final validation
- Save all CSV exports for compliance and troubleshooting
- Screenshot any FAIL or WARNING results
- Maintain change log of remediation actions
- Initial Run: Identify all issues and plan remediation
- Mid-Preparation: Verify fixes and identify new issues
- Pre-Migration: Final validation before migration window
- Post-Migration: Verify environment remains properly configured
- Run script from secure workstation
- Use dedicated migration service account (not personal admin account)
- Store credentials securely (never in scripts or logs)
- Review permissions granted to migration accounts
- Remove migration accounts and trusts after project completion
-
v1.0 (2026-01-14): Initial release
- Core prerequisite checks for ADMT migrations
- DNS, functional level, trust, and permission validation
- Network connectivity testing
- Optional SID History and PES checks
- CSV export with remediation guidance
- Summary reporting
- Overview
- Start-LyncCsvExporter
- Get-ComprehensiveLyncReport
- Get-LyncHealthReport
- Get-LyncInfrastructureReport
- Get-LyncServiceStatus
- Get-LyncUserRegistrationReport
- Export-ADLyncTeamsMigrationData
- New-Office365Accounts
- Sync-ContactsFromCsv
- Set-EmailToSharedAccount
- Set-SMTPForward
- Invoke-UserSignOutAndBlock
- Security Assessment Scripts (coming soon)
- Azure Automation (documentation pending)
- Get-GraphToken
- Get-GraphHeaders
- Get-AzureResourcePaging
- Get-EnterpriseAppUsage
- Get-ExchangeErrorsGraph
- Get-PBIWorkspaceUsageReport
- Intune Management (documentation pending)