Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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

by enigmae (Pilgrim)
on Oct 11, 2002 at 16:10 UTC ( #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
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,
  • Comment on Re: How to fetch groups and users on a win2k system

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2023-03-31 22:09 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (77 votes). Check out past polls.