← ALL SCRIPTS PowerShell · v1.0 · 3-mode validation

Invoke-DNSMigrationValidation

Two-phase validation tooling for a DC-to-Infoblox DNS migration — capture a JSON baseline of DC, SRV and PTR state before cutover, then validate against the new authoritative DNS server afterwards and diff against the stored baseline. Three modes: Baseline → Validate → Compare. Transport is RPC / DCOM / LDAP only — no WinRM dependency.

Built to support the operational runbook for moving DNS authority off domain controllers and onto an Infoblox grid for a single AD domain. Baseline mode (Phase 0) is run pre-cutover against a DC to capture the current state of the world — DC inventory, critical SRV records (LDAP, Kerberos, GC) globally and per AD Site, forward A and reverse PTR records for every DC — and persists it to a JSON file. Validate mode (Phase 4) runs the same record-set probes against the new authoritative DNS server (typically the Infoblox grid VIP). Compare mode runs Validate and diffs the live result set against the stored baseline, flagging missing or shrunken record sets so the migration is provably whole.

DC health checks are mode-aware: in Baseline mode the script uses dcdiag /test:dns and dcdiag /test:locatorcheck against the DC’s own DNS. In Validate / Compare modes it deliberately avoids dcdiag — every dcdiag test uses the local Windows resolver, which on a DC whose NIC hasn’t been repointed to the new DNS server yet will hang for minutes. Instead the script runs PowerShell-native checks: TCP port probes (LDAP, Kerberos, RPC-EPM, SMB, and GC if applicable), and a real LDAP bind to RootDSE proving each DC is answering as a DC. A pre-flight reachability gate (TCP/53 + UDP/53 + a canary SOA query for the target domain) fails the run fast with a clear reason if the target DNS server isn’t answering, instead of grinding through 6+ minutes of timeouts.

Secure dynamic update is exercised by triggering ipconfig /registerdns on a DC via CIM-over-DCOM and re-resolving the A record, confirming GSS-TSIG signed updates succeed against the new grid. Every run produces a styled HTML report and a per-run log; Baseline mode also writes a JSON baseline file you can re-use across runs. SMTP delivery of the HTML report is optional. The script exits 0 / 1 / 2 for PASS / WARN / FAIL so it can drive a scheduled-task or pipeline gate.

What it checks
  • Three modes: Baseline / Validate / Compare
  • Pre-flight reachability (TCP/53, UDP/53, SOA)
  • DC enumeration via LDAP (no WinRM)
  • Baseline: dcdiag /test:dns + locatorcheck
  • Validate: TCP ports LDAP/KRB/RPC/SMB/GC
  • Validate: LDAP bind / RootDSE per DC
  • DC locator via target DNS server
  • Critical SRV: LDAP / Kerberos / GC
  • Per-AD-site SRV records
  • Forward A record matches DC IPv4
  • Reverse PTR resolution per DC
  • AD replication health (repadmin)
  • Secure dynamic update (GSS-TSIG)
  • JSON baseline for re-use
  • Compare-mode diff vs. baseline
  • Styled HTML report + per-run log
  • Optional SMTP email delivery
  • Exit code 0 / 1 / 2 (PASS / WARN / FAIL)
PowerShell 5.1+ RSAT-AD Baseline / Validate / Compare No WinRM needed Pre-flight gate HTML + JSON SMTP email
Get Script on GitHub

Opens github.com/rt109048/Invoke-DNSMigrationValidation in a new tab

Get in touch

Let’s talk identity.

Open to advisory, contract and permanent opportunities involving Active Directory, Entra ID, identity governance, or zero-trust programmes. The best way to reach me is by email.

Location
United States — Remote