Reputation: 253
I'm currently working on a script to change some Mailboxfolderpermissions in Exchange 2010. The basic functions work, I can read out the current permission-status and I can set permissions, but the cmdlet Set-Mailboxfolderpermission does not correctly set the permissions.
For example:
Set-MailboxFolderPermission -Identity Owner:\Calendar -User TargetUser -AccessRights Contributor
This results in a custom named setting, where nothing changed in relation to the previous setting.
Same thing when I substitute Contributor
with the explicit permissions FolderVisible, CreateItems
.
Update:
I just tried to use the cmdlet from the shell and there it works. To test whether the internal output is right, I printed the permissions on the shell and everything was fine. Right now I'm wondering even more.
What is the point here? Is it a bug, am I to frustrated to see the right way out of my problem?
Upvotes: 2
Views: 16186
Reputation: 76
I use the below - just be certain to use the UPN & Set permission - Set doesn't always work - You could just first remove the current & then add a different permission:
Remove-MailboxFolderPermission -identity "[email protected]:\calendar" -User [email protected]
Add-MailboxFolderPermission -identity "[email protected]:\calendar" -User [email protected] -AccessRights owner
Upvotes: 2