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

Group and Users within the group 2

Status
Not open for further replies.

onpnt

Programmer
Joined
Dec 11, 2001
Messages
7,778
Location
US
Hi all --

Just a quick question (I hope)

Currently we do not have AD in place and I'm by all means not to high in knowledge on the networking side of things (obviously from my profile :P) and I need to generate a listing of all NT groups and the users that are in those groups. I'm coming up a bit short on finding solutions without ADSI. I know NET commands can give me group names and then another gets me all users but I need this data to be outputted to some sort flat file for later use due to SOX documentation needs.

Thanks and please let me know if more details are needed.
onpnt ...




___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
something like this has been floating around in my head but not really working out

command line

FOR %a IN (NET GROUP) DO ECHO %a | NET USER

so for each group in the net group list
write the group and then output the net user values

but that obviously wouldn't work right -- jsut what I have in my feable head after a 12 hour day :P

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
Hello onpnt,

Try this (.vbs wsh admin script) as a starting point for further refinement?
Code:
sdom="mydomain"    '[green]<<<your domain name[/green]
set odom=getobject("WinNT://" & sdom)
odom.filter=array("group")
for each ogroup in odom
    sreport="domain : " & sdom & vbcrlf
    sreport=sreport & "group : " & ogroup.name & "member list :- " & vbcrlf
    for each omember in ogroup.members
        sreport = sreport & omember.name & vbcrlf
    next
    wscript.echo sreport
next
wscript.echo "Done."
set odom=nothing
regards - tsuji
 
Being lazy myself adn not very good with scripting I use Dameware Utilities for that little bute..... I believe there is a eval copy...... believe me it is worth every pound (about£300 for the full suite per admin!)

For file permissions I use dumpsec which is free free free :)


Ooops scrub that about DW I just saw that Systemtools olso do "Exporter" doing exactly what you require for the same price as Dumsec.... free.... free.... free Bless the people at systemtools!

Iain
 
tsuji - that did the trick. I hacked together something similar but couldn;t get passed some syntax issues and didn't have the time in how much I (tiem) I dedicated to this the other day. we all know how that time management thing goes. Thanks for the hand and script. Much better then my resulting process of a batch file and parser

Spirit - I found that site a few days ago and marked it but wanted to thank you for pushing me back there cause I found a few other things that are going to make some reporting needs very, very painless.

again thanks to both of you. have a good weekend

___________________________________________________________________

onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top