Hi,@Rising Flight
Thanks for posting your question in the Microsoft Q&A forum.
The error message suggests that there is a problem with the syntax of your Select-Object
command. The issue might be with the way you're specifying the properties to select, especially since you have a space in 'extension attribute01'. PowerShell might be interpreting 'extension attribute01' as two separate arguments rather than one property name.
Here is how you can modify your command:
Get-DistributionGroupMember -Resultsize Unlimited
Here is my test, the command works fine.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.