Avatar of Fr. Vandecan
Fr. Vandecan
Flag for Belgium asked on

Mystery of Calendar Permission role - PowerShell - Reviewer

I'm struggeling to handle roles for calendar...
The purpose is to open calendar of people who leave the cy.
I'm using this :
Try{Add-MailboxFolderPermission -Identity ${$CalendarDestinationAlias}:\"Calendar" -User $UserToGiveAccessToAlias -AccessRights $Rights -erroraction SilentlyContinue}
Catch{$bOk = $False}
Try{Set-MailboxFolderPermission -Identity ${$CalendarDestinationAlias}:\"Calendar" -User $UserToGiveAccessToAlias -AccessRights $Rights -erroraction SilentlyContinue}
Catch{$bOk = $False}

where Rights is "Reviewer".

Unfortunately even with Reviewer, I only see free/busy information but not the full details of the agenda....
Do I need first to be sure that user $UserToGiveAccessToAlias has NO Access at all ? (if yes then how?)

Avatar of undefined
Last Comment
Fr. Vandecan

8/22/2022 - Mon

When you view what the user has for permissions what are they? It might be set that by default all users have access to view free/busy only. So when you add permissions the old permissions are still there. You may need to remove the default permissions before or after you add the reviewer permissions.

Let's view what is already set on the calendar:
Get-MailboxFolderPermission "emailaddressofthecalendar:\calendar | ft -auto

If any of the users you are trying to add reviewer rights already have rights on that calendar create a .csv file with their emailaddresses and above those email address put USERS. Name the file users.csv and save it to c:\temp(or a file location of your choosing)
run the below command against that list.
Import-CSV c:\temp\users.csv | %{Set-MailboxFolderPermission emailaddressofthecalendar:\calendar -User $_.Users -AccessRights Reviewer}

create another .csv file with any other users who never had rights to the calender and name it users2.csv and with a heading users2 and put it in c:\temp as well.

Import-CSV c:\temp\users2.csv | %{Set-MailboxFolderPermission emailaddressofthecalendar:\calendar -User $_.Users2 -AccessRights Reviewer}
Fr. Vandecan

That's correct. By default everybody has AvailabilityOnly
I'm lost.

how to achieve this change ? I have to remove first the AvailabiltyOnly to the users I want to give Reviewer Access?

@Fox : it seems that both commands are the same. so I do not follow your thinking....
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Fr. Vandecan

Tks Fox:
a latest question about Calendar : I'm working in Belgium. This is a small country. However, we have here 4 potentials different language and the users have therefore the possibility to have Calendar (EN), Kalendar(Dutch), Calendrier (French) and also the german version.I  would like to avoid to try each time each language for every mailbox calendar...

any idea?