The CMD's for managing users on Office 365 is very limited.
I want a simple list of groups a specific msoluser is member of.
How can I achive this?
I guess I'll have to use a combination of get-msoluser, get-msolgroup and get-msolgroupmember?
Technology Tips and News
The CMD's for managing users on Office 365 is very limited.
I want a simple list of groups a specific msoluser is member of.
How can I achive this?
I guess I'll have to use a combination of get-msoluser, get-msolgroup and get-msolgroupmember?
For specific user username@yourdomain.com
Connect-MsolService $UserEmailAddress = "username@yourdomain.com" $Groups = Get-MsolGroup -All foreach ($Group in $Groups) { $GroupID = $Group.objectid $GroupName = $Group.DisplayName Get-MsolGroupMember -GroupObjectId $GroupID | where {$_.emailaddress -like $UserEmailAddress} | select @{Name="Group"; Expr={$GroupName}},EmailAddress }