Files
claudetools/scratch-dry-promo.ps1
Howard Enos 2fd646218d sync: auto-sync from HOWARD-HOME at 2026-07-07 17:33:19
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-07 17:33:19
2026-07-07 17:33:56 -07:00

23 lines
1.6 KiB
PowerShell

$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 =="