Get-EaiGroupMemberCount

Module: Exchange_AddIn
Applies to: Exchange Online, Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019

Use the Get-EaiGroupMemberCount function to simply create 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 one line of PowerShell code.

Get-EaiGroupMemberCount

SYNOPSIS

Get member count of groups.

SYNTAX

Get-EaiGroupMemberCount [[-Path] <Object>] [[-FileName] <Object>] [<CommonParameters>]

DESCRIPTION

Gets all distribution groups and security enabled groups and presents name and member count of each group.
Outputs the content into a csv file.

EXAMPLES

EXAMPLE 1

Get-EaiGroupMemberCount

This will obtain distribution group list in CSV export.
Default path is: $env:temp\DistributionGroups.csv

EXAMPLE 2

Get-EaiGroupMemberCount -path c:\temp -FileName DGs.csv

This will obtain distribution group list in CSV exported file to c:\temp titled DGs.csv

PARAMETERS

-Path

Path of output location for CSV file to be placed.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: $env:TEMP
Accept pipeline input: False
Accept wildcard characters: False

-FileName

File name to be filled in as the target .csv file that is to be used.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: DistributionGroups.csv
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Amazon Affiliate

As you make purchases from Amazon, consider clicking my link first, then purchase items as you normally would. This helps support my blogging efforts, and it costs you nothing. Simply click the Amazon link and complete your ordinary shopping tasks. Thank you.

Disclosure: As an Amazon Associate, I earn a small commission from qualifying purchases made through the links in this post, at no extra cost to you. This helps support the blog!