Düzenle

Aracılığıyla paylaş


Use PowerShell to set live events policies in Microsoft Teams

Note

We're currently still supporting live events. While we still recommend you to upgrade to Teams town halls to take advantage of new features and experiences, your users can continue to schedule events. For more information, see Updates for Town Hall in Microsoft Teams and Teams Live Events.

You can use the following Windows PowerShell cmdlets to set and assign policy settings for live events in Teams:

Note

Before you can run these cmdlets you must be connected to Skype for Business Online PowerShell. For more information, see Manage Skype for Business Online with Microsoft 365 or Office 365 PowerShell.

The following sections provide user scenarios for various PowerShell commands used to manage events produced in Teams:

Note

These examples are for events produced in Teams.

Allow a user to schedule live events

  1. If the user is assigned the global policy, run the following script and verify that the -AllowBroadcastScheduling parameter is set to True:
Get-CsTeamsMeetingBroadcastPolicy -identity Global
  1. Next, to assign the user to the global policy, run the following script:
Grant-CsTeamsMeetingBroadcastPolicy -Identity {user} -PolicyName $null -Verbose

You want all users in your organization to be able to schedule live events

If users are assigned the global policy, run and verify that -AllowBroadcastScheduling is set to True:

Get-CsTeamsMeetingBroadcastPolicy -identity Global

If users are assigned a policy other than the global policy, run and verify that -AllowBroadcastScheduling is set to True:

Get-CsTeamsMeetingBroadcastPolicy -identity {policy name}

You want to turn off live events scheduling for your organization

To turn off live events scheduling, run the following script:

Set-CsTeamsMeetingBroadcastPolicy -identity Global -AllowBroadcastScheduling $false

To assign all users in your organization to the global policy, run the following script:

Grant-CsTeamsMeetingBroadcastPolicy -Identity {user} -PolicyName $null -Verbose

You want a large number of users to be able to schedule live events and prevent a set of users from scheduling them

1. Allow a large number of users to schedule live events

  1. Run the following script to verify that **-AllowBroadcastScheduling**is set to True:
Get-CsTeamsMeetingBroadcastPolicy -Identity Global
  1. Next, to assign a user or users to the global policy, run the following script:
Grant-CsTeamsMeetingBroadcastPolicy -Identity {user} -PolicyName $null -Verbose

2. Create a new policy that doesn't allow specific users to schedule live events

  1. To create a new policy that doesn't allow specific users to schedule live events, run the following script:
New-CSTeamsMeetingBroadcastPolicy -Identity DisabledBroadcastSchedulingPolicy
  1. To turn off live events scheduling, run the following script:
Set-CsTeamsMeetingBroadcastPolicy -Identity DisabledBroadcastSchedulingPolicy -AllowBroadcastScheduling $false
  1. To assign users to this policy, run the following script
Grant-CsTeamsMeetingBroadcastPolicy -Identity {user} -PolicyName DisabledBroadcastSchedulingPolicy -Verbose

You want to turn off live event scheduling for a large number of the users and allow a set of users to schedule them

1. Turn off live events scheduling for a large number of users

  1. To disable live events scheduling, run the following script:
Set-CsTeamsMeetingBroadcastPolicy -identity Global -AllowBroadcastScheduling $false
  1. To assign those users to the global policy, run the following script:
Grant-CsTeamsMeetingBroadcastPolicy -Identity {user} -PolicyName $null -Verbose

2. Create a new policy that allows specific users to schedule live events

  1. To create a policy to allow live events scheduling, run the following script:
New-CSTeamsMeetingBroadcastPolicy -identity EnableBroadcastSchedulingPolicy
  1. To turn on live events scheduling, run the following script:
Set-CsTeamsMeetingBroadcastPolicy -identity EnableBroadcastSchedulingPolicy -AllowBroadcastScheduling $true
  1. To assign users to this policy, run the following script:
Grant-CsTeamsMeetingBroadcastPolicy -Identity {user} -PolicyName EnableBroadcastSchedulingPolicy -Verbose

Set who can join live events

To set the global policy to allow users to create events that everyone, including anonymous users, can attend, run the following script:

Set-CsTeamsMeetingBroadcastPolicy -Identity Global -BroadcastAttendeeVisibility Everyone  

Set the recording option for live events

Note

This setting applies only to events produced in Teams.

To set the global policy to disable recording for live events, run the following script:

Set-CsTeamsMeetingBroadcastPolicy -Identity Global -BroadcastRecordingMode AlwaysDisabled 

Set live captions and subtitles in live events

Note

This setting applies only to events produced in Teams.

To set the global policy to turn on live captions and subtitles (transcription) for event attendees, run the following script:

Set-CsTeamsMeetingBroadcastPolicy -Identity Global -AllowBroadcastTranscription $true