I've been working to fine-tune my script to search message tracking logs, then worked on another script to find out which 'accepted domains' have actual email addresses behind them.
This is my current code to query AD, and determine if an email address exists in the OU you asked it.
function Valid-emailAddress {
[CmdLetBinding()]
param(
[parameter(mandatory=$true,helpmessage="SMTP email address(es) of everyone to get report")]
[string[]]$email,
[parameter(mandatory=$true,helpmessage="LDAP Path to OU containing mailboxes.")]
[string]$ParentContainerDN
)