I threw this together for ya to help out:    :-)
 
strUser = "<groupname>"
strComputer = "<domain>"
strPath = "WinNT://" & strComputer & "/" & strUser & ",group"
wscript.echo "Path: " & strPath
wscript.echo
Set objUser = GetObject(strPath)
Set objClass = GetObject(objUser.Schema)
'on error resume next
WScript.Echo "Mandatory properties for " & objUser.Name & ":"
For Each property In objClass.MandatoryProperties
 wscript.stdout.write property & vbTab
 WScript.stdout.write objUser.Get(property)
 wscript.echo
Next
WScript.Echo "Optional properties for " & objUser.Name & ":"
For Each property In objClass.OptionalProperties
 wscript.stdout.write property & vbTab
 WScript.stdout.write Typename (objUser.Get(property)) & vbTab
 WScript.stdout.write objUser.Get(property)
 wscript.echo
Next
 
set arr = objUser.Members
for each str in arr
 wscript.echo str.Class & " " & str.name
next


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Hargraves
Sent: Tuesday, August 01, 2006 11:02 PM
To: [email protected]
Subject: Re: [ActiveDir] Need some user/group tools...

That's not even fair.... I own that book already.

I was hoping to avoid doing the scripting part... but that being said, how much of that will work in NT domains to get groups and their members/memberships?


On 8/1/06, Michael B. Smith <[EMAIL PROTECTED]> wrote:
You can certainly get all the piece parts from here:
 
 
And you can use joe's wonderful adfind (or dsquery if you were to insist) to do much of the gruntwork. I show you some examples here:
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Matt Hargraves
Sent: Tuesday, August 01, 2006 7:29 PM
To: [email protected]
Subject: [ActiveDir] Need some user/group tools...

This might be something that I can do with a combination of scripts, though I'm not sure where I'd get them from.

1) I need to be able to export a list of users (the userID is fine) with their group memberships. (AD objects)

2) I need to be able to export a list of groups with their list of members and memberships. (AD objects)

3) I need to be able to export a list of groups with their list of members and memberships. (NT objects)

Once I get all of that information, I need to 'connect the dots' between domains to determine overall group membership (across domains), including nesting.  If the tool doesn't exist to do this last part I'm sure I can find someone to do the gruntwork of putting together a _vbscript_
to do the grunt work of it in Access or something like that.

Preferably all of this would go into CSV files so that it can go into Access or maybe pull it all into SQL.

Thanks for any help that can be provided.

Reply via email to