$ErrorActionPreference='SilentlyContinue' Import-Module ActiveDirectory -ErrorAction SilentlyContinue "== OS / edition (must be Std/DC-capable) ==" $os=Get-CimInstance Win32_OperatingSystem; "$($os.Caption) $($os.Version)" "== AD DS deployment module (needed to promote + to run Test-ADDSDomainControllerInstallation) ==" Get-Module -ListAvailable ADDSDeployment | Select-Object Name,Version | Format-Table -Auto | Out-String "== Secure channel to domain ==" nltest /sc_query:TPS.local 2>&1 | Out-String "== Locate a DC for the domain ==" nltest /dsgetdc:TPS.local 2>&1 | Out-String "== Port reachability to current DC 192.168.1.125 (need all OPEN) ==" foreach($p in 53,88,135,389,445,3268,636){ $r=Test-NetConnection -ComputerName 192.168.1.125 -Port $p -WarningAction SilentlyContinue; "{0,-6} {1}" -f $p, $(if($r.TcpTestSucceeded){'OPEN'}else{'CLOSED'}) } "== Time offset vs DC (Kerberos needs < 5 min) ==" w32tm /stripchart /computer:192.168.1.125 /samples:1 /dataonly 2>&1 | Select-Object -Last 3 | Out-String "== Schema objectVersion (87=2016, 88=2019 -> promotion auto-adpreps if 87) ==" $sch=(Get-ADRootDSE).schemaNamingContext "objectVersion: $((Get-ADObject $sch -Property objectVersion).objectVersion)" "== Free space C: (NTDS + SYSVOL target) ==" $v=Get-Volume -DriveLetter C; "Free GB: $([math]::Round($v.SizeRemaining/1GB,1))" "== This box's current DNS (post-promo it should point to itself) ==" Get-DnsClientServerAddress -AddressFamily IPv4 | Where-Object {$_.ServerAddresses} | Select-Object InterfaceAlias,@{n='DNS';e={$_.ServerAddresses -join ','}} | Format-Table -Auto | Out-String "== DONE =="