The term ‘Get-Distributiongroupmember’ is not recognized as the name of a cmdlet,function, script file, or operable program

Hi Everyone this is Prem, I have worked as Microsoft 365 support ambassador. In this blog I will share How to Fix Get-Distributiongroupmember not Recognized error.

This command is available on Exchange online and Exchange on-premise.

So depending on where you want to run the command you will have to make sure you met the requirement.

If your Distribution group of which you want to get a list of members, is either in Exchange online or Exchange on premise, just make sure the PowerShell on which you are running is meeting the requirements.

For a Distribution group of which you want to retrieve members of, is in Exchange Online, this Get-Distributiongroupmember not Recognized error occurs, when we run the command in the Windows PowerShell which is not connected to exchange online.

If its not connected correctly you will get error like this:

The term 'Get-Distributiongroupmember' is not recognized as the name of a cmdlet, function, script file, or operable program.
Get-Distributiongroupmember not Recognized error in Exchange On-Premise:
For a Distribution group which is on your On-premise Exchange server, this error can occur when you run this command on a Windows PowerShell and not on the Exchange management Shell.
For Exchange On-premise PowerShell commands, we will have to make sure that we run the commands in the Exchange Management Shell and not the Windows PowerShell.
Exchange Management Shell is only available on the Windows Server on which you have Exchange server installed.
Make sure you are on the right server and then run the Get-Distributiongroupmember command in the Exchange management shell.
You can find the syntax of the command below and use the supported parameter which is required as per your need.
It should be able to run the command successfully without giving you the same Get-Distributiongroupmember not Recognized error.
Get-Distributiongroupmember not Recognized in Exchange Online:
If the group is located in Exchange online, then to fix this error, Open your windows PowerShell as Administrator on your computer and then connect it to Exchange online using this article.

Once connected, you should be able to run the Get-Distributiongroupmember command.

Below is the syntax of the command:

[-Credential ]
[-DomainController ]
[-ResultSize ]


Example for the above command:

Get-DistributionGroupMember -Identity "Group Name"

Above “Group Name” is the name of the group of which we want to get the members list.


If I Run the command on my Distribution list named dis, I get the Output showing all the members:

Get-DistributionGroupMember -Identity "dis"

The output shows the list of users with their Name and the Recipient type.


To know more about the command Get-Distributiongroupmember, refer Microsoft Official article.

Do let me know if you have any question.


Author: Prem

Tag: Get-Distributiongroupmember not RecognizedI

Leave a Comment

Your email address will not be published. Required fields are marked *