Get-GroupMemberCount
Need to know a member count of ALL distribution groups and e-mail enabled security groups in your organization that exports to a CSV file? Then this function is for you.
Get-GroupMemberCount
This function simply creates a .CSV file of all the e-mail enabled groups and current member count. May not be the most elaborate task, but a common one that is more than just 1 line of PowerShell code.
If you don’t specific the path parameter, it’ll default to your local user account temp folder, which it’ll tell you where the file is written to. Or, you can specific a path of your choosing:
Get-GroupMemberCount -path c:\temp
And as always, you can run Get-Help against the function to get more information. To use this function, simply install the MO_Module on your machine:
Install-Module -Name MO_Module