Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ADSI: EmptySecurityGroups_DistributionGroup::

Posted on 2012-03-30
4
Medium Priority
?
187 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
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…

705 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