Calendar permissions for all in Office 365 using PowerShell


hello all,

in office 365, trying achieve give , everyone's full access calendar permission.

meaning, if have 10 users in o365, every one  must have everyone's calendar access add, deleted, edit calendar/meeting entries.

can achieved by powershell ?

hi,

you'll need foreach loop that. give try:

$allusers = get-mailbox | select identity  foreach ( $user in $allusers ) {      get-mailbox | foreach {           add-mailboxfolderpermission $($_.samaccountname)+":\calendar" -user $user.identity -accessrights  publishingeditor           }  }

this untested, don't have exchange @ home. 1 issue see might cause problem when user in first foreach loop meets himself in second loop.

...

i decided not lazy. if code above run problems, try instead:

$allusers = get-mailbox | select identity  foreach ( $user in $allusers ) {      get-mailbox | foreach {           if ( $_.identity -ne $user.identity ) {              add-mailboxfolderpermission $($_.samaccountname)+":\calendar" -user $user.identity -accessrights  publishingeditor         }          }  }


don't retire technet!



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WMI Repository 4GB limit - Win 2003 Ent Question

Change home folder default permission?

Qualys showing "Null Session/Password NetBIOS Access" on DCs - Not Sure How/If this can be fixed.