PowerShell
Edit|Remove
$Mailboxlist = Import-Csv .\Fullaccessgroups.csv 
foreach ($Mailbox in $Mailboxlist) { 
#Group with permissions to shared mailbox 
$Group = $Mailbox.User 
#Shared mailbox 
$Identity = $Mailbox.Identity 
#Get Group ID 
$ID = (Get-AzureADGroup -Filter "DisplayName eq '$Group'").ObjectId 
#Get groupmembers 
Get-AzureADGroupMember -ObjectId $ID | foreach-Object {  
#Write-Host "Added " $_.UserPrincipalName" To " $Identity 
#Add Full access mailbox permission 
Add-MailboxPermission -Identity $Identity –AccessRights FullAccess –user $_.UserPrincipalName 
} 
}
 

 

This script wil add full access permissions to members of a group. Make a csv export with the following properties: Identity User AccessRights. The script wil use the csv to change the groupmembership to a user membership recursively for all group members.

 

CSV Example:

Identity User AccessRights
Identity mailbox 1 Groupname 1 FullAccess
Identity mailbox 2 Groupname 2 FullAccess
Identity mailbox 3 Groupname 3 FullAccess
Identity mailbox 4 Groupname 4 FullAccess
Identity mailbox 5 Groupname 5 FullAccess
Identity mailbox 6 Groupname 6 FullAccess
Identity mailbox 7 Groupname 7 FullAccess
Identity mailbox 8 Groupname 8 FullAccess
Identity mailbox 9 Groupname 9 FullAccess
Identity mailbox 10 Groupname 10 FullAccess
Identity mailbox 11 Groupname 11 FullAccess
Identity mailbox 12 Groupname 12 FullAccess
Identity mailbox 13 Groupname 13 FullAccess
Identity mailbox 14 Groupname 14 FullAccess