DSQuery script
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DSQuery script
I need to query AD and find all the active users in our company and find what groups they are in. How do I do this? Is this only a command line query or can I do this from "Active Directory Users and Computers"?
DSQuery script
I need to query AD and find all the active users in our company and find what groups they are in. How do I do this? Is this only a command line query or can I do this from "Active Directory Users and Computers"?
DSQuery script
Another approach if you have a text list of groups is this http://www.sapien.com/blog/2007/02/19/g ... uerydsget/
- joel.delatorre
- Posts: 83
- Last visit: Tue Jan 17, 2017 9:26 am
DSQuery script
Adfind can do this.adfind -b "dc=yourDomain,dc=com" -f "objectcategory=person" attr memberof, cn
DSQuery script
Yep. I didn't even begin to mention all the other free tools that could get this done. Ultimately, jwelch, it depends on your comfort level and what you want to do with the information once you have it.
DSQuery script
Here is a script i wrote out to pull the information then i put it into notepad and use Find/Replace to strip out the undersiderable details. Hope it helps.
List users limit to max 2000 user and put out to a text file.
dsquery user -limit 2000 >listuser.txt
List users by Department to a text file:
dsquery user -limit 0 |dsget user -dept -dn >> userlistDept.txt
List Computers in network
dsquery computer -limit 2000 >CPUlist.txt
Hope you enjoy.
Alan Mitchell
cooldisks.com
List users limit to max 2000 user and put out to a text file.
dsquery user -limit 2000 >listuser.txt
List users by Department to a text file:
dsquery user -limit 0 |dsget user -dept -dn >> userlistDept.txt
List Computers in network
dsquery computer -limit 2000 >CPUlist.txt
Hope you enjoy.
Alan Mitchell
cooldisks.com
DSQuery script
Figures lol its the way it goes i didnt even look at the date on it. I do have a useful tool here for others i created a XP version of DSquery scripting for my desktop by going into Windows 2003 and pulling out the following files, i placed them into a folder on my XP box and now i can query against any server without logging into it.
dsprop.dll, dsquery.dll, dsquery.exe, dsrestor.dll, dsrevt.dll, dsrm.exe, dssec.dat, dssec.dll, dssenh.dll, dssite.msc, dsuiext.dll, dsuiwiz.dll.
Since people are still finding their way here someone may use it.
dsprop.dll, dsquery.dll, dsquery.exe, dsrestor.dll, dsrevt.dll, dsrm.exe, dssec.dat, dssec.dll, dssenh.dll, dssite.msc, dsuiext.dll, dsuiwiz.dll.
Since people are still finding their way here someone may use it.