DSQUERY USER

Searches for user accounts matching criteria.

dsquery user [{StartNode | forestroot | domainroot}]
[-o {dn | rdn | upn | samid}] [-scope {subtree | onelevel | base}]
[-name Name] [-namep NamePhonetic]
[-desc Description] [-upn UPN] [-samid SAMName]
[-inactive NumberOfWeeks] [-stalepwd NumberOfDays]
[-disabled] [{-s Server | -d Domain}] [-u UserName]
[-p {Password | *}] [-q] [-r] [-gc] [-limit NumberOfObjects]
[{-uc | -uco | -uci}]

This command is available in Windows Vista Business or later if Remote Server Administration Tools Pack has been installed.

Get Active Directory® Administrator's Pocket Consultant now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.