in reply to using perl to collect NT groups

The module I use most for NT Administration is Win32::Lanman - It offers pretty much everything I need. I've also used Win32::NetAdmin and Win32::AdminMisc, but those are less full-featured.

One of the best features of Win32::Lanman is that all the function names & arguments are straight out of the Win32 API, so if you're already familiar with that, it's much easier to use. Plus, you can search through Microsoft's MSDN for more information on these calls if you need more info than what is provided in the documentation.

Here's the Win32::Lanman group-related functions:

Win32::Lanman::NetUserGetGroups
Win32::Lanman::NetUserGetLocalGroups
Win32::Lanman::NetUserSetGroups
Win32::Lanman::NetGroupAdd
Win32::Lanman::NetGroupAddUser
Win32::Lanman::NetGroupDel
Win32::Lanman::NetGroupDelUser
Win32::Lanman::NetGroupEnum
Win32::Lanman::NetGroupGetInfo
Win32::Lanman::NetGroupGetUsers
Win32::Lanman::NetGroupSetInfo
Win32::Lanman::NetGroupSetUsers
Win32::Lanman::NetQueryDisplayInformation

Lots of good stuff.

You could also use the Win32::OLE module combined with ADSI. And, if you are pulling groups from Active Directory you could use Win32::OLE with ADO.. this is my favorite method for accessing large AD collections. Our domain has over 61,000 computer objects and over 200,000 user objects.