Hi again,
Below script will add Reviewer permissons for DefaultCalendarShare group. This is needed for Hybrid environments and Cross-Premises calendar sharing.
$allmailbox =
Get-Mailbox -Resultsize
Unlimited |
where { $_.IsShared -eq
$False -and
$_.ArbitrationMailbox
-eq $Null
}
Get-Mailbox -Resultsize
Unlimited |
where { $_.IsShared -eq
$False -and
$_.ArbitrationMailbox
-eq $Null
}
$Logfile =
“C:TempLogsadd-calendarPerm.log”
“C:TempLogsadd-calendarPerm.log”
Foreach ($Mailbox
in $allmailbox)
in $allmailbox)
{
$cal
= (Get-MailboxFolderStatistics
$Mailbox |
where {$_.foldertype -eq
“calendar” } )
= (Get-MailboxFolderStatistics
$Mailbox |
where {$_.foldertype -eq
“calendar” } )
$Kalenteri= $cal.name
Add-mailboxfolderpermission
-identity $Mailbox.UserPrincipalname+”:$Kalenteri”
-user DefaultCalendarShare
-Accessrights Reviewer
-identity $Mailbox.UserPrincipalname+”:$Kalenteri”
-user DefaultCalendarShare
-Accessrights Reviewer
Add-Content
$Logfile “Add
permission to $Mailbox folder $Kalenteri”
$Logfile “Add
permission to $Mailbox folder $Kalenteri”
Write-host
“Add permission to $Mailbox folder $Kalenteri”
“Add permission to $Mailbox folder $Kalenteri”
}