Set Default access to Reviewer for all mailboxes Office365 powershell outlook agenda

Set Default access to Reviewer for all mailboxes Office365 powershell outlook agenda

Step 1: Connect to Exchange Online using PowerShell

$Credential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic -AllowRedirection
Import-PSSession $Session

Step 2: Generate a list of all mailboxes

$users = Get-Mailbox -Resultsize Unlimited

Step 3: Set Default access to Reviewer for all mailboxes

foreach ($user in $users) {
Write-Host -ForegroundColor green “Setting permission for $($user.alias)…”
Set-MailboxFolderPermission -Identity “$($user.alias):\calendar” -User Default -AccessRights Reviewer
}

 

Echter bij Step 3 de volgende gebruikt (ook ivm taal instellingen)

foreach ($user in $users) {

Write-Host -ForegroundColor green “Setting permission for $($user.alias)…”

Set-MailboxFolderPermission -Identity “$($user.alias):\agenda” -User Default -AccessRights Editor

}