简体   繁体   中英

How do I set Microsoft Teams General Channel Permissions through PowerShell

I am disabling permissions for everyone to chat on "General" Teams channel manually by

  1. clicking on (...)
  2. Manage channel
  3. selecting 'Only owners can post messages'

How can I do the same with PowerShell without any manual clicks?.

在此处输入图像描述

The CsTeamsMessagingPolicy cmdlets enable administrators to control if a user is enabled to exchange messages.

Set-CsTeamsMessagingPolicy
   [-AllowUserChat <Boolean>] 

-AllowUserChat

Determines whether a user is allowed to chat. Set this to TRUE to allow a user to chat across private chat, group chat and in meetings. Set this to FALSE to prohibit all chat.

For example:

Set-CsTeamsMessagingPolicy -Identity StudentMessagingPolicy
-AllowUserChat $false -AllowMemes $false

In this example two different property values are configured: AllowUserChat is set to false and AllowMemes is set to False. All other policy properties will be left as previously assigned.

Ref:

https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmessagingpolicy?view=skype-ps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM