Sample script that searches Active Directory for all the contact accounts on October 1, 2007 or later. The whenChanged attribute is replicated to the Global Catalog. This means you can connect to a Global Catalog server and search across the forest for all contacts whose accounts were last modified on a specified date.

PowerShell
Edit|Remove
$strFilter = "(&(objectClass=Contact)(whenChanged>=20071001000000.0Z))"

$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; $objItem.name}