Hello,
I am trying to get the list of all O365 groups a user is member of. I tried the above but ran into issues.
$UserEmail= "emailaddress"
$Mailbox = Get-Mailbox | Where {$_.PrimarySmtpAddress -eq $UserEmail}
$Office365GroupsMember = Get-UnifiedGroup | where { (Get-UnifiedGroupLinks $_.Alias -LinkType Members | foreach {$_.name}) -contains $mailbox.Alias}
type or paste code here
I got the error message
*WARNING: By default, only the first 1000 items are returned. Use the ResultSize parameter to specify the number of items re
turned. To return all items, specify "-ResultSize Unlimited". Be aware that, depending on the actual number of items, retur
ning all items can take a long time and consume a large amount of memory. Also, we don't recommend storing the results in a
variable. Instead, pipe the results to another task or script to perform batch changes.
How can I fix this?*
Thanks.
I tried this and it is still displaying the same error message. I am new at powershell and trying to learn.
By default, only the first 1000 items are returned. Use the ResultSize parameter to specify the number of items re
turned. To return all items, specify “-ResultSize Unlimited”. Be aware that, depending on the actual number of items, retur
ning all items can take a long time and consume a large amount of memory. Also, we don’t recommend storing the results in a
variable. Instead, pipe the results to another task or script to perform batch changes.
You tried what? You didn’t show your code. The filter must not have worked if it’s still stating it returned more than 1000. Please show your latest attempt