Solved

List AD groups that contain nested groups

Posted on 2010-11-23
6
811 Views
Last Modified: 2012-05-10
Need a script to list only the AD groups that contain groups.  Would like to have an option to include or exclude listing all group members.  Output needs to show full AD path where the main group and nested groups are located.

Thanks
0
Comment
Question by:Carl Webster
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:KenMcF
ID: 34198886
If you are able to use the quest cmdlets from your other question you can try this

to get group memebrs you can add this

get-qadgroupmember $g | select name
$groups = get-qadgroup -searchroot "OU=Groups,dc=Domain,dc=Local" | where{$_.memberof -ne ""} 

foreach ($Group in $Groups){

write-host $group.name

$grp = get-qadmemberof $Group

foreach ($g in $grp){

write-host `t $g.dn

}}

Open in new window

0
 
LVL 4

Expert Comment

by:Vishal Patel
ID: 34204107
You can use AD Manager Plus (A ManageEngine tool, free to try) for the purpose.
0
 
LVL 36

Author Comment

by:Carl Webster
ID: 34232373
I am now on this network and it is a 2000 AD system and all the DCs are running 2000 SP4.

Anyone have a VBScript I could use to list which of their 416 AD groups contain groups?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 27

Accepted Solution

by:
KenMcF earned 500 total points
ID: 34232490
I do nopt have a vbscript but could create one if needed later.
You could try to use ADFind or just a query in ADUC

(&(objectcategory=group)(memberof=*))

adfind -default -f "&(objectcategory=group)(memberof=*)" dn

you could also get the members from ADFind or you could output the list from ADFInd to a test and use vbscript to get all the members

http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/usersgroups/groups/#EnumGroupmembership.htm
0
 
LVL 36

Author Comment

by:Carl Webster
ID: 34232582
I can't find out how in 2000's ADUC how to do a search to list only groups that contain groups.

I was able to use ADFind to list all the groups.  ADFind says there are 479 groups and ADUC says there are 416.  I'll trust ADFind and Joe.

Just tried your ADFind line and it worked.  Gave me a list of 62 groups.  Let me verify a random sample.
0
 
LVL 36

Author Comment

by:Carl Webster
ID: 34232630
I guess this will work.  Your "adfind -default -f "&(objectcategory=group)(memberof=*)" dn" gives me a list of groups that contain groups or groups that are members of other groups.

i.e. Domain Admins contains other groups but GroupABC has no members but is a member of GroupXYZ.  WHen I look at GroupXYZ it shows GroupABC as a member.  

That should work for this purpose.

Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now