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:
Once connected, you should be able to run the Get-Distributiongroupmember command.
Below is the syntax of the command:
Get-DistributionGroupMember
[-Identity]
[-Credential ]
[-DomainController ]
[-IgnoreDefaultScope]
[-IncludeSoftDeletedObjects]
[-ReadFromDomainController]
[-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:
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.
Date:18/05/2023
Author: Prem
Tag: Get-Distributiongroupmember not RecognizedI