Get-ADPrincipalGroupMembership equivalent in Office365 Microsoft.Exchange RRS feed

  • Question

  • Hi Everyone...

    I am racking my brain trying to locate a simple cmdlet that will list the groups one user is a member of similar to Get-ADPrincipalGroupMembership does for AD.  I successfully connect to Microsoft.Exchange and have all the cmdlets available but I can't seem to find one that just lists a user's group membership.

    My actual end game is to be able to copy group membership from one user to another.  I've got the following, just need the correct cmdlet to insert.

    write-output "Script to copy Source User's Distro group membership to Target User`n`n"
    $SUser = Read-Host "Enter the name of the Source User "  
    $TUser = Read-Host "Enter the name of the Target User "  
    $gitgname = NEEDED CMDLET $SUser | select name
    foreach($groupname in $gitgname.name)
    Add-DistributionGroupMember -identity $groupname -member $TUser

    Any help finding the correct cmdlet would be greatly appreciated.

    Sincerely...  LosingSleep

    • Edited by KingDwight Tuesday, April 8, 2014 11:20 PM
    • Moved by Bill_Stewart Saturday, July 12, 2014 1:23 PM Abandoned
    Tuesday, April 8, 2014 11:20 PM

All replies