![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: How to fetch groups and users on a win2k systemby enigmae (Pilgrim) |
on Oct 11, 2002 at 16:10 UTC ( #204565=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|