Avatar of miki0
miki0

asked on 

count members in security group in o365

Is there a way to count the number of members that are part of security groups that are all part of a big security group.

Thank you.
Security

Avatar of undefined
Last Comment
miki0
Avatar of Amit Kumar
Amit Kumar
Flag of India image

user this one after connecting Exchange online powershell

(get-distributiongroupmember -identity GroupName).count
Avatar of arnold
arnold
Flag of United States of America image

To amit'.s point, over the past four months there are several questions/answers on this topic within EE dealing with using,powershell to run nested queries after using powershell to connect to office365 ps interafce.
Avatar of miki0
miki0

ASKER

It only gives me a number of sub-groups that are part of this group. :/
Avatar of arnold
arnold
Flag of United States of America image

You have to nest .

Please provide as much detail as what the end result you want.

Do you want group
 Subgroup1
         Members of of group
           Subgrouba
               Members of
 Subgroup2
 


Repeat.

Or do you want to count members direct and based on nested groups.
Avatar of miki0
miki0

ASKER

Just looking for a total number of members that are part of this big group that doesn't have direct members  as users in, but rather sub-groups that have members. Does this make sense now?
Avatar of arnold
arnold
Flag of United States of America image

One way is to get the aggregate, or have a report that
Top group
        Direct member
         Subgroup
                 Sub group members
                  Sub subgroup
                          Sub subgroup members
          Subgroup2
....

You possibly could maintain a central count of users, you enviably might get surprised how many members. And would need to ...

The iterative where you provide the root group, when a group is found, it will call the same function......

Let me work this through...
Avatar of miki0
miki0

ASKER

I have 174 or so universal-security "email enabled" groups, under one OU in AD called Security Groups. I am syncing them to O365 and have created one Distribution group in the cloud - O365 called "GroupOfTheDay" which these groups are part of, and every day different groups are part of this O365 distribution group. Those 174 universal groups in my AD are auto populated by our FIM. Things are changing from day to day so to have different groups as members is so annoying and gives me headaches. This script should have to be immune to those changes and always ready to give me the right and correct "Total" number of members-users that are part of this group for the day.
This is just a short story of otherwise same question I posted initially for this topic.
Thank you for the help in advance.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of miki0
miki0

ASKER

Thank you.
Security
Security

Security is the protection of information systems from theft or damage to the hardware, the software, and the information on them, as well as from disruption or misdirection of the services they provide. The main goal of security is protecting assets, and an asset is anything of value and worthy of protection. Information Security is a discipline of protecting information assets from threats through safeguards to achieve the objectives of confidentiality, integrity, and availability or CIA for short. On the other hand, disclosure, alteration, and disruption (DAD) compromise the security objectives.

32K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo