Discussion:
Using dsquery/dsget with non-standard attributes
(too old to reply)
Jason Williard
2007-02-15 22:38:18 UTC
Permalink
Is there a way to query non-standard user attributes in Active Directory
using dsquery, dsget or another tool?
Ken Aldrich
2007-02-15 23:15:32 UTC
Permalink
What do you mean by "non-standard attributes"? Do you mean attributes that
simply do not show up in the Active Directory Users and Computers tool?

DSQUERY should allow you to query those. Lets say, for example, you added
an attribute called "IsAContractor" to your schema and you populated it with
True or False for your user accounts. If you wanted to report the value of
that attribute DSQUERY should work.

If you want something more comprehensive you can use a 3rd party tool such
as DSRAZOR for Windows. You could use DSRAZOR to manage and report on those
attributes using a nice GUI tool. You could even use DSRAZOR to delegate
simple UIs to employees in your company to manage or report on those
attributes.

Take a look at www.visualclick.com/?source=021507Query
--
Ken Aldrich
DSRAZOR for Windows
Visual Click Software, Inc.
www.visualclick.com
Post by Jason Williard
Is there a way to query non-standard user attributes in Active Directory
using dsquery, dsget or another tool?
Jason Williard
2007-02-15 23:27:02 UTC
Permalink
Post by Ken Aldrich
What do you mean by "non-standard attributes"? Do you mean attributes that
simply do not show up in the Active Directory Users and Computers tool?
By "non-standard attributes" I mean those that don't show up in ADUC. I
would like to find an easy way to look this attribute up when working with
different users.
Post by Ken Aldrich
DSQUERY should allow you to query those. Lets say, for example, you added
an attribute called "IsAContractor" to your schema and you populated it with
True or False for your user accounts. If you wanted to report the value of
that attribute DSQUERY should work.
Knowing that it is possible, what is the DSQUERY syntax for such a query?
Post by Ken Aldrich
Post by Jason Williard
Is there a way to query non-standard user attributes in Active Directory
using dsquery, dsget or another tool?
Thank You,
Jason Williard
kj
2007-02-16 00:35:13 UTC
Permalink
Adfind?
--
/kj
Post by Jason Williard
Post by Ken Aldrich
What do you mean by "non-standard attributes"? Do you mean attributes that
simply do not show up in the Active Directory Users and Computers tool?
By "non-standard attributes" I mean those that don't show up in ADUC. I
would like to find an easy way to look this attribute up when working with
different users.
Post by Ken Aldrich
DSQUERY should allow you to query those. Lets say, for example, you added
an attribute called "IsAContractor" to your schema and you populated it with
True or False for your user accounts. If you wanted to report the value of
that attribute DSQUERY should work.
Knowing that it is possible, what is the DSQUERY syntax for such a query?
Post by Ken Aldrich
Post by Jason Williard
Is there a way to query non-standard user attributes in Active Directory
using dsquery, dsget or another tool?
Thank You,
Jason Williard
Paul Williams [MVP]
2007-02-16 07:51:21 UTC
Permalink
Using DSQUERY you would do something like:

dsquery * domainroot -filter
"(&(objectCategory=person)(objectClass=user))" -attr givenName sn mail


You can pipe that to DSGET and do more.

I, and many others here, prefer ADFIND. It's a lot more powerful, and the
guy who wrote it frequently posts here and will always give plenty of help
and support. There's also forums for it's use on his website. Google
ADFIND.

adfind -default -f "(&(objectCategory=person)(objectClass=user))" givenName
sn mail


Here's a UI - lDAPDisplayName mapping:
-- http://msdn2.microsoft.com/en-us/library/ms677980.aspx


Look on MSDN for all the other attributes, or take a peek using ADSIEDIT and
the start building queries based on that info.
--
Paul Williams
Microsoft MVP - Windows Server - Directory Services
http://www.msresource.net | http://forums.msresource.net
Joe Richards [MVP]
2007-02-17 19:52:38 UTC
Permalink
You probably should spend a little time and look at my adfind and admod.
Most folks who like the command line end up really liking these over the
ds* tools MSFT provides. They are free and blow out a lot of the for-pay
tools available as well.

--
Joe Richards Microsoft MVP Windows Server Directory Services
Author of O'Reilly Active Directory Third Edition
www.joeware.net


---O'Reilly Active Directory Third Edition now available---

http://www.joeware.net/win/ad3e.htm
Post by Jason Williard
Is there a way to query non-standard user attributes in Active Directory
using dsquery, dsget or another tool?
Loading...