Sample script that searches Active Directory for all computers with Ken Myer as a manager. The managedBy attribute is not replicated to the Global Catalog, meaning you cannot connect to a Global Catalog server and search across the forest for computers managed by a specified user. Note that this attribute is not automatically populated any time you create a computer account.

$strFilter = "(&(objectCategory=Computer)(managedBy='CN=Ken Myer,CN=Users,dc=fabrikam,dc=com'))"

$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; $}