February 2018

Monthly Archives

Language independent permission settings for AgendaX on Exchange Server 2013, 2016, 2019, Office 365

Permissions that need to be set for the AgendaX account on Exchange Server 2013, 2016, 2019, and Office 365 are Outlook folder level permissions.
Since folder names in Outlook differ depending on the language used when the mailbox is first opened with Outlook, you'd have to know which employee uses which language to assign permissions to the correct folders. In addition to that, you'd have to know what the folders are called in these languages.

If you have mailboxes in multiple languages in your company, you can easily set the required permissions for the AgendaX account using the following script, which works for all languages.

Please make sure you replace "agendax" on the 3rd line with the name of your AgendaX account:

foreach ($Mailbox in (Get-Mailbox -ResultSize Unlimited))
  $AgendaXAccount = "agendax"

  $InboxStat = Get-MailboxFolderStatistics -Identity $Mailbox -FolderScope Inbox
  $InboxName = "$($Mailbox.PrimarySMTPAddress)" + ":\" + "$($InboxStat.Name)"
  $CalendarStat = Get-MailboxFolderStatistics -Identity $Mailbox -FolderScope Calendar
  $CalendarName = "$($Mailbox.PrimarySMTPAddress)" + ":\" + "$($CalendarStat.Name)"

  Write-Host "Applying permissions to mailbox: $($Mailbox.Name) (TOIS/$($InboxStat.Name)/$($CalendarStat.Name))"

  $AccRightTOIS = Get-MailboxFolderPermission -identity $Mailbox.PrimarySMTPAddress -user $AgendaXAccount >$null 2>&1
  $AccRightInbox = Get-MailboxFolderPermission -identity $InboxName -user $AgendaXAccount >$null 2>&1
  $AccRightCalendar = Get-MailboxFolderPermission -identity $CalendarName -user $AgendaXAccount >$null 2>&1

  If ($AccRightTOIS.AccessRights -ne "Reviewer") {Add-MailboxFolderPermission -identity $Mailbox.PrimarySMTPAddress -AccessRights Reviewer -User $AgendaXAccount >$null 2>&1}
  If ($AccRightInbox.AccessRights -ne "Reviewer") {Add-MailboxFolderPermission -identity $InboxName -AccessRights Reviewer -User $AgendaXAccount >$null 2>&1}
  If ($AccRightCalendar.AccessRights -ne "Editor") {Add-MailboxFolderPermission -identity $CalendarName -AccessRights Editor -User $AgendaXAccount >$null 2>&1}

Just copy and paste the above script into Powershell. It will assign Reviewer rights on the top of the mailbox and Inbox, as well as Editor rights on the Calendar folder.

If you don't want to assign these rights on every mailbox in your organization, but would rather limit this to an organizational unit for example, you can modify the Get-Mailbox statement on the 1st line by adding -OrganizationalUnit with the name of the organizational unit you wish to assign permissions in.

Contributions related to the subject

Would you like to write a guest post?
Please contact us.