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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enumerating Groups and Users

Status
Not open for further replies.

CFUS

IS-IT--Management
Sep 2, 2003
6
US
I know this might be simple to everyone, but for the life of me I cannot get a script to get objGroup for each user in my domain...basically all I need is a simple script that will connect to my domain and output to a text file a list of users with the group they belong to...

objUser & objGroup

Thanks for any help
 
Hello CFUS,

Not much confidence in answering this sort of question because the config is, as a norm, complicated enough to warrant a simple description---no pointing at your posting but a general feeling when seeing these types of questions.

How about trying out this see if it meets your config.
Code:
const dn="mydomainname"
sMnkr="winNT://"&dn
set oDomain=GetObject(sMnkr)
oDomain.Filter=Array("user","group")
for each obj in objDomaine
	wscript.echo obj.name
next
The output & format to a file is a separate task that you can handle I guess.

regards - tsuji
 
erratum
objDomaine is a typo and should be read oDomain.
Code:
for each obj in oDomain
    wscript.echo obj.name
next
- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top