- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Windows Server 2003
- >
- help extracting group members in AD?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2006 10:52 PM
тАО04-25-2006 10:52 PM
help extracting group members in AD?
Many thanks
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 12:29 AM
тАО04-26-2006 12:29 AM
Re: help extracting group members in AD?
http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/default.mspx
for example http://tinyurl.com/od9v5
or dsget command:
dsget group "GroupDN" -members
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 02:25 AM
тАО04-26-2006 02:25 AM
Re: help extracting group members in AD?
http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/adgpvb13.mspx
On Error Resume Next
Set objGroup = GetObject _
("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
WScript.Echo "Members:"
For Each strMember in arrMemberOf
WScript.echo strMember
Next
and I renamed all these parts to my domain
("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
but I get nothing? it finds nothing, Ive ran it from the cmd prmpt, remaned it VBS, but it just pops up with nothing..... what else do I need to modify?
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 12:20 PM
тАО04-26-2006 12:20 PM
Re: help extracting group members in AD?
Dim array, objArguments, strGroup
Set objArguments = Wscript.Arguments
If WScript.Arguments.Count = 0 then
Wscript.Echo "Syntax: cscript //nologo LocalGroupMembers.vbs GroupName"
Wscript.Quit
End If
strGroup = objArguments(0)
Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName
Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ",group")
For Each objMember In objGroup.Members
array = Split(objMember.Parent,"/")
If UCASE(array(Ubound(array))) = UCASE(strComputer) Then
WScript.Echo """" & objMember.Name & """"
else
WScript.Echo """" & array(Ubound(array)) & "\" & objMember.Name & """"
End If
Next
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 05:06 PM
тАО04-26-2006 05:06 PM
Re: help extracting group members in AD?
There is a tool called local found in the resource kit. Basically
local group_name domain_name
will display the members of the group group_name in the domain domain_name.
see
http://www.ss64.com/nt/local.html
http://www.petri.co.il/download_free_reskit_tools.htm
An alternative is the mmc. Occassionally I have a need to export a list of members in an AD container. This may or may not be the same as a group in your AD. You can do this with the mmc (microsoft management console):
1) At the cmd prompt, type mmc
2) Go the File menu then select Add/Remove Snap-in...
3) On the Standalone tab click on Add
4) You'll see a list. Look for the snap-in called Active Directory Users and Computers
5) You should see a list of your AD containers. You may have a container called users but you may also have a container called Accounting and within that container called Staff. If you were to click on Staff, select members and then click on the Export icon at the top of the screen you can export the list of users in that container.
You could also try
net group mygroup
on the domain controller. It should list the names of mygroup.
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 06:27 PM
тАО04-26-2006 06:27 PM
Re: help extracting group members in AD?
You need to modify ONLY LDAP string, I think you problem is LDAP string.
If you have mistake in LDAP string you will really have "pops up with nothing".
If you group is in Users container (I think it is default in AD) you string must be like:
"CN=Aerolight,CN=Users,DC=test,DC=stam,DC=com", where Aerolight is group name in container users in domain test.stam.com
Note: CN=Users and not OU=Users as in microsoft example.
I usually use ADSI edit tool and get LDAP string from properties (distinguishedName) of the group (just copy/paste).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 06:41 PM
тАО04-26-2006 06:41 PM
Re: help extracting group members in AD?
Dim groupname
groupname=InputBox("Enter group name" & chr(13),"Group members","IntUsr")
tempstr= "LDAP://cn=" & groupname & ",OU=GROUPS,OU=Site_name,dc=domain,dc=com"
Set objOU = GetObject(tempstr)
objGroup.GetInfo
arrMemberOf = objGroup.GetEx("member")
Const ForRead=1
Const ForWrite=2
Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("c:\results\group_members_" & groupname & ".txt", ForWrite, True)
For Each strMember in arrMemberOf
objTextFile.WriteLine(strMember)
Next
objTextFile.Close
We have all groups in one conatiner so I did modification to become "user friendly" and to give imput to file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 12:01 AM
тАО04-27-2006 12:01 AM
Re: help extracting group members in AD?
Try the security reporter. It is best to install it on a server. (sql is optional) If you call them they would help walk you through installing it. They have a 30 day free trial. I highly recommend it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 04:24 AM
тАО04-27-2006 04:24 AM
Re: help extracting group members in AD?
Download here:
http://www.systemtools.com/hyena/download.htm
I believe that it has a fully functioning 30-day trial.
I've been using it since its early days while administering NT4.0 stuff.
Hope this helps
-J.S.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 09:34 PM
тАО04-27-2006 09:34 PM
Re: help extracting group members in AD?
2) and I renamed all these parts to my domain
("LDAP://cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com")
apearantly you missed some change.
i should expect "LDAP://cn=dd-fla-tl-map...."
maybe the "ou=R&D" also needs change?
Pieter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-26-2009 08:32 AM
тАО01-26-2009 08:32 AM
Re: help extracting group members in AD?
Check for AD Group Members in http://ctxadmtools.musumeci.com.ar