title: PowerShell ProxyEmail Address
body: <p>Currently I have the script below, which will compare email addresses in the CSV to the main mail address in ActiveDirectory, but it does not take proxy addresses into account. For instance, if Mary Smith had an email address Mary.Smith@abc.com, then Mary got married and her last name changed to Jones. Her standard email address is still Mary.smith@abc.com but she now has a proxy called mary.jones@abc.com.</p>
  
  <p>How do I use this script to also validate against the proxyaddresses? Preferably without a huge hit to Active Directory .</p>
  
  <pre><code>$path = "H:\users.csv"
  $csv = Import-Csv $path 
  Import-Module ActiveDirectory
  
  foreach ($line in $csv)
  {
      $User = Get-ADUser -LDAPFilter "(&amp;(objectclass=user)(mail=$($line.Email)))"
      if ($User -eq $Null) {"User does not exist in AD   " + $line.Email }
      else {"User found in AD  - " + $line.Email}
  }
  </code></pre>