Sunday, November 12, 2017

How to get list of empty groups in active directory

     When we do cleanup activity in Ad,we might wanted to check if any empty groups exist's.How to get the list of empty groups in Ad ?

We can get the list easily with help of Active  directory power shell .Below is the one-liner command to pull the information

Get-ADGroup -Filter * -Properties Members | where {-not $_.members} | select Name | Export-Csv C:\ADemptygroupLIST.csv –NoTypeInformation

Regards
Bijesh
Blog4IT

No comments:

Post a Comment