[EXO][PS] Identify if user is part of a big AD Group


Quickly check if a user or subset of users are part of a ad group that has more than 5000 members.

$adgroup = “[group]”
$groupdn = (get-adgroup $adgroup).distinguishedname
$members = dsget group $grouppn -members
$total = foreach ($i in $members){$u = $i.trim('"'); get-aduser $u | select userprincipalname}
$total -like "*[unique string]*"

 

test Exchange Administrator Tecism
Sorry! The Author has not filled his profile.
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted