Solved

ADSI: EmptySecurityGroups_DistributionGroup::

Posted on 2012-03-30
4
186 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

622 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