Problems listing the members of an Office 365 Dynamic Distribution List

%3CLINGO-SUB%20id%3D%22lingo-sub-1250661%22%20slang%3D%22en-US%22%3EProblems%20listing%20the%20members%20of%20an%20Office%20365%20Dynamic%20Distribution%20List%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1250661%22%20slang%3D%22en-US%22%3E%3CP%3EFollowing%20the%20instructions%20from%20Microsoft%20and%20others%2C%20I%20was%20able%20to%20list%20the%20members%20of%20a%20DDL%20that%20we%20have%20this%20morning.%26nbsp%3B%20Now%2C%20when%20I%20run%20the%20very%20same%20command%2C%20it%20says%20%22completed%22%2C%20but%20no%20data%20is%20returned.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20command%20I%20run%20is%3A%3C%2FP%3E%3CP%3EGet-Recipient%20-Resultsize%20Unlimited%20-RecipientPreviewFilter%20(get-dynamicdistributiongroup%20groupname%40contoso.com).RecipientFilter%20%7C%20fl%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstructions%20from%20Microsoft%20are%20found%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2FExchange%2Frecipients-in-exchange-online%2Fmanage-dynamic-distribution-groups%2Fview-group-members%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2FExchange%2Frecipients-in-exchange-online%2Fmanage-dynamic-distribution-groups%2Fview-group-members%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicrosoft's%20instructions%20fail%20for%20me.%3C%2FP%3E%3CUL%3E%3CLI%3E%24FTE%20%3D%20Get-DynamicDistributionGroup%20%22%5Bmy%20group%20name%5D%22%3C%2FLI%3E%3CLI%3EGet-Recipient%20-RecipientPreviewFilter%20%24FTE.RecipientFilter%20-OrganizationalUnit%20%24FTE.RecipientContainer%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20code%20has%20never%20worked%2C%20and%20returns%20an%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20A%20parameter%20cannot%20be%20found%20that%20matches%20parameter%20name%20'OrganizationalUnit'.%3C%2FP%3E%3CP%3EWhen%20I%20remove%20the%20parameter%20for%20%E2%80%9C-OrgazationalUnit%E2%80%9D%2C%20it%20returns%20another%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20A%20positional%20parameter%20cannot%20be%20found%20that%20accepts%20argument%20'%5Bmydomainname%5D.onmicrosoft.com'.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDefinitely%20confused.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1250661%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1251368%22%20slang%3D%22en-US%22%3ERe%3A%20Problems%20listing%20the%20members%20of%20an%20Office%20365%20Dynamic%20Distribution%20List%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1251368%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20first%20cmdlet%20is%20what%20you%20should%20use%20for%20O365%2C%20the%20second%20variation%20is%20for%20on-premises.%20The%20syntax%20of%20both%20is%20correct%20though%2C%20if%20you%20are%20not%20getting%20any%20results%20back%20the%20group%20is%20%22empty%22.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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
Highlighted

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".