# Changing Exchange folder permissions in multilanguage Office 365 tenants

One of the tasks I often get when setting up new Office 365 tenant or installing Exchange Servers is to change the visibility of Room Mailboxes or in some cases even standard users. There’s nothing hard about it, and there are plenty of articles about it. It’s just three simple steps.

blog

22 Mar 2019 pl

![Changing Exchange folder permissions in multilanguage Office 365 tenants](/wp-content/uploads/2019/03/img_5c951eafc7844.png)

[Zobacz obrazy (2)](#pf-content-image-1-0)

One of the tasks I often get when setting up new **Office 365** tenant or installing Exchange Servers is to change the visibility of **Room Mailboxes** or in some cases even standard users. There's nothing hard about it, and there are plenty of articles about it. It's just three simple steps.

### 💡 Show meeting details of a Exchange (Office 365) room calendar

- 💡 Connect to Microsoft Exchange / Microsoft Exchange Online
- 💡 Set visibility of calendar from **None** to **Limited Details** for everyone

You just need to change **Folder Permissions** to **Limited Details** on **Room:\Calendar** using code below

```powershell
Set-MailboxFolderPermission -AccessRights LimitedDetails -Identity Room:\calendar -User default
```

- 💡 Show the **Subject** and **Organiser**

And if it's needed change how calendar processing is done on those Room Mailboxes. Depending on business requirements management may want to add an organizer to subject.

```powershell
Set-CalendarProcessing -Identity Room -AddOrganizerToSubject $true -DeleteComments $false -DeleteSubject $false
```

By default, the subject is deleted, so depending on your requirement you need to set it to true or false. If you set your **DeleteSubject** to **false **only new meeting requests will be affected. For existing meetings you will see the organizer and the location, new calendar entries will also have the subject displayed.

### 💡 Show meeting details of a Exchange (Office 365) room calendar for other languages

It wasn't that bad, right? And it's well-known knowledge that you can get when you ask Google for that. What I wanted to mention in this article is that depending on the language set on user mailbox setting **LimitedDetails** access right will most likely fail if it's anything then **English**. In my case, it's almost never English. So what do you do? Simple you use the language you expect on the mailbox!

```powershell
Set-MailboxFolderPermission -AccessRights LimitedDetails -Identity Room:\Kalendarz -User default
```

See? Simple! Well not really. There are lots of **languages** out there and knowing which user, which mailbox has what **language** is hard to guess. Fortunately, there's a way to ask **mailbox** to give us that information so we don't have to guess and have a fully automated way to do that.

[

[!\[Show meeting details of a Exchange (Office 365) room calendar for other languages\](/wp-content/uploads/2019/03/img_5c951eafc7844.png)](/wp-content/uploads/2019/03/img_5c951eafc7844.png)

```powershell
$Mailboxes = Get-Mailbox -RecipientTypeDetails RoomMailbox
$Count = 0
foreach ($Mailbox in $Mailboxes) {
    $Count++
    $Folder = Get-MailboxFolderStatistics -Identity $($Mailbox.UserPrincipalName) -FolderScope Calendar #-ErrorAction Stop
    Write-Color "[", $Count, '/', $Mailboxes.Count, '] ', "Processing ", $Mailbox.UserPrincipalName -Color Yellow, White, Yellow, White, Yellow, White, Green
    foreach ($F in $Folder) {
        if ($F.FolderType -eq 'Calendar') {
            $CalendarPath = $F.FolderPath -Replace '/', '\'
            Set-MailboxFolderPermission -Identity "$($Mailbox.UserPrincipalName):$CalendarPath" -User Default -AccessRights LimitedDetails -ErrorAction SilentlyContinue -WhatIf
            Set-CalendarProcessing -Identity $Mailbox.UserPrincipalName -AddOrganizerToSubject $true -DeleteComments $false -DeleteSubject $false -ErrorAction SilentlyContinue  -WhatIf
            Write-Color -Text "[", $Count, '/', $Mailboxes.Count, '] ', "Processed ", $Mailbox.UserPrincipalName, ' on folder type ', $F.FolderType, ' path ', $CalendarPath `
                -Color Yellow, White, Yellow, White, Yellow, White, Yellow, White, Green
        }
    }
}
```

As you can see above, I'm merely getting all mailboxes and then for each mailbox I'm executing **Get-MailboxFolderStatistics** which happens to have **FolderType** available for each entry. This is always stored in **English**. So we use **foreach** to check for **Calendar** entry and use that folder as **CalendarPath**. Remember to change **RecipientTypeDetails** to any other type you may want to adjust settings for. Also, keep in mind that **Set-CalendarProcessing **may not be required in your scenario. You can apply the same approach to any other** folder type** to cover other needs. As you can see on the screenshot below folder names are in **Swedish** but **FolderType** stays in **English**. That way it's easy to apply that knowledge to other scenarios you may have.

```powershell
Get-MailboxFolderStatistics -Identity $($Mailbox.UserPrincipalName) | Format-Table -AutoSize Name, FolderPath, FolderType, CreationTime, Date, LastModifiedTime
```

[!\[Get-MailboxFolderStatistics\](/wp-content/uploads/2019/03/img_5c952094212ae.png)](/wp-content/uploads/2019/03/img_5c952094212ae.png)

Keep in mind that the code above that fixes Calendar entries has FolderScope defined as Calendar. This means that only Calendar is returned. If you want to get all of it, simply skip that and you should be able to apply your changes to any type of folder you need.

## Powiązane projekty

Projekty powiązane z tagami, kategoriami i treścią tego wpisu.

[Wszystkie projekty](/projekty/)

Trwa dopasowywanie projektów...

[Powrót do bloga](/blog/)

## Powiązane wpisy

- [Check an API write after a PowerShell timeout](/blog/verify-uncertain-api-outcomes-powershell/)
- [Inspect and convert mixed Office archives with PSWriteOffice](/blog/inspect-and-convert-mixed-office-archives-pswriteoffice/)
- [Compose PDF reports and automate page workflows with PSWriteOffice](/blog/automate-pdf-reports-and-page-workflows-pswriteoffice/)

<!-- PowerForge markdown artifact sha256:6B40E45E3D60C59B254BB78B931157A64A8CBE05A03CE70B38644A94D66779BD -->
