You can try AdminMisc found at Roth.net it has the following funtions

GetGroups( $Server, $GroupType, < $List | \@List | \%List > [, $Prefi +x ] ) This will, if successful, populate the @List array with the names +of the user groups that match the group type $GroupType. If $Prefix is p +assed in then only groups with names beginning with $Prefix (case insensiti +ve) will be stored into the array. $Server is either: - The name of the machine the accounts reside on in either "\\\s +erver" or "//server" format. - The name of a domain as in "Accounting" where the user account +s reside. - An empty string ("") which returns the user accounts for the l +ocal machine.

GetUsers( $Server, $UserPrefix, < $List | \@List | \%List > ) This will, if successful, populate the @List array with the names +of the user accounts which begin with $UserPrefix. $UserPrefix can be an empty string in which all user accounts will + be returned. This parameter is case insensitive. $Server is either: - The name of the machine the accounts reside on in either "\\\s +erver" or "//server" format. - The name of a domain as in "Accounting" where the user account +s reside. - An empty string ("") which returns the user accounts for the l +ocal machine. The third parameter can either be a scalar, an array reference or +a hash reference. If it is an array then upon success the group names populate the array. + If it is a scalar then it is converted into a hash reference. Hash references are popula +ted with the user id, full name, comment, and account flags. Returns: The number of group names stored in the array or hash.

I havent finished putting any code together for this yet but am busy with it and will post it as I have it.

-----
Of all the things I've lost in my life, its my mind I miss the most.

In reply to Re: How to fetch groups and users on a win2k system by AcidHawk
in thread How to fetch groups and users on a win2k system by Ananda

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.