Sample script that searches Active Directory for a user with the Exchange email alias of kenmyer. The mailNickname attribute is replicated to the Global Catalog, meaning you can connect to a Global Catalog server and search across the forest for a specified email address. This attribute is available only if you have installed Microsoft Exchange.

$strFilter = "(&(objectCategory=User)(mailNickname=kenmyer))"

$objDomain = New-Object System.DirectoryServices.DirectoryEntry

$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.PageSize = 1000
$objSearcher.Filter = $strFilter

$colProplist = "name"
foreach ($i in $colPropList){$objSearcher.PropertiesToLoad.Add($i)}

$colResults = $objSearcher.FindAll()

foreach ($objResult in $colResults)
    {$objItem = $objResult.Properties; $}