active directory - Saved LDAP Query Locked Out Specific OU -
currently can in powershell via script:
search-adaccount –lockedout -searchbase 'ou=location,ou=country,dc=company,dc=com' | ft name, samaccountname, lastlogondate
i rather have in ldap saved query, found 1 display locked out accounts in company:
(&(&(objectcategory=person)(objectclass=user)(lockouttime>=1)))
i have tried number of combinations, can't seem right. here 1 of them:
(&(&(objectcategory=person)(objectclass=user)(memberof=ou=location,ou=country,dc=company,dc=com)(lockouttime>=1)))
what doing wrong?
as information, when create new query, have option of specifying "query root"... drilling down that, able achieve desired goal. didn't have modify query string @ all.
Comments
Post a Comment