What is currently the best way to monitor the domain trust relationships and trigger an alert when there is a failure between domain controllers?
Hello, have you applied the appinsight for the AD template.
AppInsight for Active Directory (solarwinds.com)
I have, but from what I see it only lists the trust relationships. It doesn't show me the health of each of them. Am I wrong?
I was able to get this monitoring and alerting scripted out in a Powershell template. Just thought I'd share.
$myMessage = Get-WmiObject -Namespace "root\MicrosoftActiveDirectory" -query "Select * from Microsoft_DomainTrustStatus"$a = 0foreach ($trust in $myMessage) { if (!$trust.TrustIsOk) { $a++ Write-Host "Message: The domain trust between" (Get-ADDomain).name " and " $trust.TrustedDomain "has failed" Write-Host "Statistic: 3" $exitCode = 3 Exit (3) }}if ($a -eq 0 ) { Write-Host "Message: OK" Write-Host "Statistic: 0" $exitCode = 0 Exit (0)}