powershell: share calender company-wide

OliDE 40 Reputation points
2023-06-05T08:54:45.9966667+00:00

Hi, i am wondering whats the correct way to share a calender company-wide with powershell.

In outlook/calendar i can share my calendar that everyone in the company can view the items ("inside your organization" -> "can view all details"). How can i do that with powershell?

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,182 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 119.7K Reputation points MVP Volunteer Moderator
    2023-06-05T15:44:24.9+00:00

    Via PowerShell, you need to leverage the Set-MailboxFolderPermission cmdlet and set the permissions on the "Default" security principal, which represents "every user within the organization". Here's an example:

    Set-MailboxFolderPermission mailboxname:\Calendar -User Default -AccessRights LimitedDetails

    If you want to do it in bulk for all users, you can use the following:

    $calendars = Get-Mailbox -RecipientTypeDetails UserMailbox | Get-MailboxFolderStatistics -FolderScope Calendar | ? {$_.FolderType -eq "Calendar"} | select @{n="Identity"; e={$_.Identity.ToString().Replace("\",":\")}}
    $calendars | % {Set-MailboxFolderPermission -Identity $_.Identity -User Default -AccessRights LimitedDetails} 
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.