Count how many users are in an AD group
The following article explains how to count how many users are members of a particular Active Directory group. This can be useful when synchronising specific users for MFA to ensure you have adequate licenses available.
- Log in to one of your Active Directory domain controllers
- Open the Powershell terminal as an administrator
- Use the following command:
(Get-ADGroup <group> -Properties *).Member.Countwhere
<group>is the name of an Active Directory security group.
Example, for a group called "MFA_Users":
(Get-ADGroup MFA_Users -Properties *).Member.Count
- Ensure that you have sufficient MFA licenses to cover the number returned in the command output