Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: How to fetch groups and users on a win2k system

by enigmae (Pilgrim)
on Oct 11, 2002 at 16:10 UTC ( [id://204565]=note: print w/replies, xml ) Need Help??


in reply to How to fetch groups and users on a win2k system

Greetings Ananda,
I have done this with success using the ADSI (Active Directory Service Interfaces) which is related to the WMI (Windows Management Instrumentation) which is really usful in getting all kinds of information computer, user, group, domain.
Here is a link on MSDN that shows many possabilities:
ASDI Scripts
Note that these are most likley written in VBScript, but that is pretty easy to convert to perl. Here is a Node I originally wrote to get the members of a group, Check the reply by Kanji at the bottom, it is a good start
http://perlmonks.org/index.pl?node_id=148262
If you have any questions don't hesitate to ask, The script I ended up writing in that node has to query a windows 2k terminal-server farm and collect processor usage stats for all users logged in.
In unix this wouldn't be an issue, processor usage is easy, but windows had no easy way, until i had to write a c++ console program (basically an equivalent ps command) that worked on terminal servers then i could collect the stats. I found that ADSI is a wonderful resource for scripting in windows, and if by chance you don't need perl for anything other then getting groups, the VBScript library on that site might be useful enough for you. What would be handy is to make a CPAN module for translating VBScript.
Good Luck,
Enigmae

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://204565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-28 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found