Asked by:
Get-ADPrincipalGroupMembership equivalent in Office365 Microsoft.Exchange

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.
cls 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
-
O365 has two components (actually more). Exchange and MSO. MSO or MSOnline has a set of Cmdlets just like exchange. This is where you will find the group-i-ness.
¯\_(ツ)_/¯
Wednesday, April 9, 2014 12:08 AM -
Here is one of many references: http://www.sharepointnutsandbolts.com/2013/12/SharePoint-Online-and-MSOL-WAAD-PowerShell-Office365.htm
¯\_(ツ)_/¯
Wednesday, April 9, 2014 12:11 AM -
HI JVR,
I'm actually connected to both but still can't find the right cmdlet.
$session = New-PSSession -ConfigurationName Microsoft.Exchange....... Connect-MsolService.....
- Edited by KingDwight Wednesday, April 9, 2014 2:06 PM
Wednesday, April 9, 2014 1:54 PM -
I think this is as close as you will get: http://msdn.microsoft.com/en-us/library/azure/dn194095.aspx
¯\_(ツ)_/¯
Wednesday, April 9, 2014 3:17 PM -
Thanks JVR! I'll look through there and see what I can figure out.
- Edited by KingDwight Wednesday, April 9, 2014 5:55 PM
Wednesday, April 9, 2014 5:53 PM