We recently had an Active Directory audit and one of the recommendations was to monitor the domain trust relationship between Ourdomain.COM and DMZ.NET.
First, I would like to know if it's possible to use SolarWinds to poll the status of the trust direction. I have attached a PowerShell script that will return 1 of 2 results depending on what it finds during the query.
###################################
# Here are the contents of the script:
###################################
$ADDC = "DCAD01PRD"
$DMZTrustDirection = gwmi -Class microsoft_domaintruststatus -Namespace "root\microsoftactivedirectory" -ComputerName $ADDC -Filter "TrustedDomain='dmz.net'" | %{ $_.TrustDirection }
If ($DMZTrustDirection -eq '1')
{
Write-Host "Incoming trust confirmed"
}
Else
{
Write-Host "Investigate trust"
}
<#
TrustDirection = Direction of Trust
1 = Incoming only
2 = Outgoing only
3 = Two-way
#>