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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.