Hi @Christopher Compton ,
maybe something like this helps to get started:
$computer = "test1"
Get-ADDomainController | ForEach-Object {
try {
$compObj = Get-AdComputer -Identity $computer -Server $_.Name -ErrorAction SilentlyContinue
if ($compObj) {
Write-Host "Computer $computer found on DC $_" -ForegroundColor Green
}
}
catch {
Write-Host "($_)" -ForegroundColor Red
}
}
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten