Problems listing the members of an Office 365 Dynamic Distribution List

Copper Contributor

Following the instructions from Microsoft and others, I was able to list the members of a DDL that we have this morning.  Now, when I run the very same command, it says "completed", but no data is returned.

 

The command I run is:

Get-Recipient -Resultsize Unlimited -RecipientPreviewFilter (get-dynamicdistributiongroup groupname@contoso.com).RecipientFilter | fl

 

Instructions from Microsoft are found here: https://docs.microsoft.com/en-us/Exchange/recipients-in-exchange-online/manage-dynamic-distribution-...

 

Microsoft's instructions fail for me.

  • $FTE = Get-DynamicDistributionGroup "[my group name]"
  • Get-Recipient -RecipientPreviewFilter $FTE.RecipientFilter -OrganizationalUnit $FTE.RecipientContainer

 

This code has never worked, and returns an error:

                A parameter cannot be found that matches parameter name 'OrganizationalUnit'.

When I remove the parameter for “-OrgazationalUnit”, it returns another error:

                A positional parameter cannot be found that accepts argument '[mydomainname].onmicrosoft.com'.

 

Definitely confused.

 

1 Reply

The first cmdlet is what you should use for O365, the second variation is for on-premises. The syntax of both is correct though, if you are not getting any results back the group is "empty".