DSQuery is a great tool for querying Active Directory however the syntax is a little tricky and difficult to use especially if you do not use it on a regular basis. This is only a small post to reference the syntax to query all Active Users in the domain to display only two attributes:
Feel free to use this article when doing basic queries for active directory attributes against user accounts.
- The users display name
- The users department
Feel free to use this article when doing basic queries for active directory attributes against user accounts.