You can create a calendar sharing policy in Exchange Online to enforce the default calendar permission settings for all users in your organization. Here’s an example PowerShell command to create a calendar sharing policy that sets the default permission level to “Reviewer” for both subject and location:

New-OrganizationPolicy -Name "CalendarSharingPolicy" -SharingPolicy "CalendarSharing" -DefaultSharingPolicy:$false
Set-SharingPolicy "CalendarSharing" -Identity "CalendarSharingPolicy" -Domains "contoso.com" -AllowedSharingRelationships "Internal", "External", "Internet" -CalendarSharingFreeBusyDetail "FreeBusyAndSubjectAndLocation" -CalendarSharingPermissionLevel "Reviewer"

In the above example, the command creates a new organization policy named “CalendarSharingPolicy” and sets it to use the “CalendarSharing” sharing policy. It then sets the default permission level to “Reviewer” for both subject and location for the specified domains and sharing relationships.

After running this command, you will need to apply the policy to all users in your organization by running the following command:

Set-Mailbox -Identity "user@contoso.com" -SharingPolicy "CalendarSharingPolicy"

Replace “user@contoso.com” with the email address of each user in your organization that you want to apply the policy to.

To assign a policy to the entire organization, use the following command:

Set-OrganizationConfig -SharingPolicy "CalendarSharingPolicy"

In this example, “CalendarSharingPolicy” is the name of the calendar sharing policy that you want to apply to the entire organization.

To assign a policy to a specific distribution group, use the following command:

Set-DistributionGroup -Identity "GroupName" -SharingPolicy "CalendarSharingPolicy"

In this example, “GroupName” is the name of the distribution group you want to apply the calendar sharing policy to, and “CalendarSharingPolicy” is the name of the calendar sharing policy that you want to apply.

Note that for both commands, you must have administrative access to the Exchange organization and be authenticated in PowerShell as an administrator.

By Taki

Leave a Reply

Your email address will not be published. Required fields are marked *