joeware - never stop exploring... :)

Information about joeware mixed with wild and crazy opinions...

From the mailbag… Finding groups with a certain string in the name

by @ 9:33 pm on 2/19/2010. Filed under tech

From: joe [mailto:support@joeware.net]
Sent: xxx
To: xxx
Subject: RE: AdFind

Hey xxx, you could do something like

adfind -default -f "&(objectcategory=group)(name=*webmaster*) " -dn

If you want to specify a domain other than the default, replace -default with -b domainDN

   joe

O’Reilly Active Directory Fourth Edition – http://www.joeware.net/win/ad4e.htm

From: xxx
Sent: xxx
To: ‘support@joeware.net’
Subject: AdFind

Joe:

Can/how can AdFind be used to find all groups in a domain that have for example, the string “webmaster” in the group name?

Any help would be appreciated.

Thanks,

xxx

Rating 3.00 out of 5

2 Responses to “From the mailbag… Finding groups with a certain string in the name”

  1. davis says:

    dsquery group -name *webmaster*

    Again, this doesn’t use your _extremely_ handy adFind tool but it is much quicker to type. Also, the output can more easily be used in scripts without having to strip the dn: out.

    I just did a very quick search and couldn’t find it … can adFind output the rdn only instead of the full DN?

  2. Mike Kline says:

    Just a comment to the comment about the typing. Don’t forget about the great shortcuts in adfind. So trying to save keystrokes use:

    adfind –sc g:*webmaster* dn

    Now it takes longer to type the dsquery command adfind wins again :)

    If you don’t want the entire dn

    adfind –sc g:*webmaster* cn -nodn

    Thanks

    Mike

[joeware – never stop exploring… :) is proudly powered by WordPress.]