Solved

ADSI: EmptySecurityGroups_DistributionGroup::

Posted on 2012-03-30
4
180 Views
Last Modified: 2013-02-26
Hi Team,
Is there a way to list all empty ADSI LDAP security groups and/or distribution groups in an active directory?

thx

JohnE
0
Comment
Question by:John Esraelo
  • 3
4 Comments
 

Author Comment

by:John Esraelo
ID: 37789481
This is, for instance, a nice one to get the admins in the domain.
I wonder if there is a simple way of getting a list of "empty" security groups and distribution groups.  (got this from a site a few minutes ago)

$Recurse = $true

Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain
$group=[System.DirectoryServices.AccountManagement.GroupPrincipal]::FindByIdentity($ct,'Administrators')
$group.GetMembers($Recurse)

Open in new window

0
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 37794053
I wrote a quick app in .NET once that will list all the groups with duplicate members in it - you could use that to identify all the groups that had no members (pick an empty group you know of and have it find all the matching groups). If nobody else posts a better solution, I could find a copy of the tool and upload it.

I'm not sure how you'd do it with powershell though.
0
 

Accepted Solution

by:
John Esraelo earned 0 total points
ID: 37797924
I have actually go an answer without using .Net and strictly using PowerShell .

Thank though.

JohnE
0
 

Author Closing Comment

by:John Esraelo
ID: 38929197
I have found the answer without using the .Net therefore.  Practically did not get an answer that I was looking for.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

757 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

21 Experts available now in Live!

Get 1:1 Help Now