Quantcast
Channel: Azure Management Portal forum
Viewing all articles
Browse latest Browse all 4189

Reporting on users group membership from list of users

$
0
0

Hi Everyone,

I have a list of users (about 150)that are in a security group, for each of the users I need to list what other security/office 365/mail enabled groups they belong to. I’ve been using msonline powershell v1 and being a complete novice have been looking at various online forums but cannot figure out how to pull the information out, what I've got so far is:

$GroupMembers = Get-MsolGroupMember -GroupObjectId (%Group ID%)

foreach ($GroupMember in $GroupMembers)

{

$Properties = @{"GroupDisplayName"=$Group_DisplayName;

"MemberDisplayName"=$GroupMember.DisplayName;

"MemberEmail"=$GroupMember.EmailAddress;
 
"MemberType"=$GroupMember.GroupMemberType}

$Obj = New-Object -TypeName PSObject -Property $Properties

Write-Output $Obj | select GroupDisplayName,MemberDisplayName,MemberEmail,MemberType }

I'm not sure what command I would use to pull the users other security group membership out, any advice would be a great help.

Cheers


Viewing all articles
Browse latest Browse all 4189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>