July 2017
Intermediate to advanced
648 pages
31h 9m
English
Using the *-MailboxFolderPermission cmdlets makes it easier to perform bulk operations on many mailboxes at once. For example, let's say that you need to assign Reviewer permissions to all employees on every mailbox calendar in the organization. You can use the following code to accomplish this task:
$mailboxes = Get-Mailbox -ResultSize Unlimited
$mailboxes | %{
$calendar = Get-MailboxFolderPermission ` "$($_.alias):\Calendar" -User Default
if(!($calendar.AccessRights)) {
Add-MailboxFolderPermission "$($_.alias):\Calendar" `
-User Default -AccessRights Reviewer
}
if($calendar.AccessRights -ne "Reviewer") {
Set-MailboxFolderPermission "$($_.alias):\Calendar" `
-User Default -AccessRights Reviewer
}
}
First, we use the Get-Mailbox ...
Read now
Unlock full access