Thursday, September 26, 2013

Set calender permissions for all users

To check permissions for calender on a user:

/> get-mailboxfolderpermission john.doe:\calender

To Set permissions for user default to reviewer on john.does calender

/>set-mailboxfolderpermission john.doe:\calendar –user Default –Accessrights Reviewer

To script this for all users

--------------SetCalendarReviewer.ps1-------------

foreach ($user in get-content users.txt)

{

set-mailboxfolderpermission ${user}:\calendar -user Default -Accessrights Reviewer

write-host "$user is processed."

}

----------------------------eof----------------------------------

It retrievs all users from test.txt which is simply one username per line.

Also below is a link to policy to always set this permission with newly created users, which I haven’t tried out yet.

References:

http://stackoverflow.com/questions/15612088/how-to-combine-variable-with-the-rest-of-the-command

http://exchangeinside.org/2013/01/set-default-calendar-permissions-for-all-new-users-to-reviewer/

http://technet.microsoft.com/en-us/library/dd351181%28v=exchg.150%29.aspx – remove-mailboxfolderpermission

http://technet.microsoft.com/en-us/library/ff522363%28v=exchg.150%29.aspx – set-mailboxfolderpermissions

No comments: