Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSGet help

Status
Not open for further replies.

wlfpackr

IS-IT--Management
May 3, 2003
161
0
0
US
Just wondering if this is possible. Let's say you have a large quantity of AD groups sequentially named:

Group-001; Group-002; Group-003........Group-100

I'd like to issue a single command to see each group and it's membership but I couldn't seem to figure out how to do it. Went on about my business and got the information in another manner, but this is still puzzling me if this can even be done?

My attempt was:

dsquery group -name Group-* -limit 0 | dsget group -samid -members >> c:\file.txt

It didn't like the -samid and -members together, but it would do -samid and -desc. It will work if I remove the -samID and only use -members, but if I don't have the group name in the file I wouldn't be able to tell which group the memebership is referring to.

=================
There are 10 kinds of people in this world, those that understand binary and those that do not.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top