Not sure where exactly you looked, but there are tons of examples on how to do it available online. For Full access, check here: https://www.michev.info/Blog/Post/1516/quickly-list-all-mailboxes-to-which-a-particular-user-has-acc...
For group membership, this is the most efficient way:
Get-Recipient -Filter "Members -eq 'CN=user,OU=domain.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com'"
where you have to specify the DistinguishedName for the user.