Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, October 11, 2016 7:53 AM
Hello,
I want to modify Exchange Mailbox Folder permissions in a bulk, I also have foudn a script which does the job. The point is just that it looks like by default in an Exchange 2016 env. if Anonymous or Default rights are set, these cannot be overwritten. My script is like this:
$Mailboxes = Get-Mailbox -ResultSize Unlimited
ForEach ($Mailbox in $Mailboxes) {
Remove-MailboxFolderPermission -Identity ($Mailbox.sAMAccountName+':\Kalender') -User Default -ErrorAction SilentlyContinue
Add-MailboxFolderPermission -Identity ($Mailbox.sAMAccountName+':\Kalender') -User Default -AccessRights AvailabilityOnly
}
I ran that script and it is ok, but it only adds permissoins where Default was none, all Mialboxes, where Default aready has some permission assigned, it thorws an error and leaves them untouched.
If I want to remove permissons of a single user for default ist says: "Cannot remove default or anonymous permissions.", if I want to simply add permissions, hopeing they will get overwritten, I get: "An existing permission entry was found for user: Default"
So, how can permissions for default, mainly on calendar, be modified?
This guy, where I got the script from, also states that Anonymous permissons cannot be removed, but I am rather interested into modifying them, see https://www.experts-exchange.com/questions/28610690/Exchange-2010-Set-Calendar-Permissions-to-everybody-using-Powershell.html
kind regards,
Dieter Tontsch
mobileX AG
All replies (2)
Tuesday, October 11, 2016 8:22 AM ✅Answered
If the permission entry already exists, you need to use the Set-mailboxfolderpermission cmdlets instead of Add-.
Also, you should have no issue modifying/removing anonymous permissions, simply use -User anonymous.
Wednesday, October 12, 2016 6:59 AM ✅Answered
Hi,
We cannot remove default or anonymous permissions, so use Set-MailboxFolderPermission cmdlet instead of Remove- and Add-
$Mailboxes = Get-Mailbox -ResultSize Unlimited
ForEach ($Mailbox in $Mailboxes) {
Set-MailboxFolderPermission -Identity ($Mailbox.sAMAccountName+':\Kalender') -User Default -AccessRights AvailabilityOnly
}
Regards,
Lynn-Li
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].