简体   繁体   English

如何通过 PowerShell 设置 Microsoft Teams 通用频道权限

[英]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?.如何在没有任何手动点击的情况下对 PowerShell 执行相同的操作?

在此处输入图像描述

The CsTeamsMessagingPolicy cmdlets enable administrators to control if a user is enabled to exchange messages. CsTeamsMessagingPolicy cmdlet 使管理员能够控制是否允许用户交换消息。

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.将此设置为 TRUE 以允许用户在私人聊天、群组聊天和会议中聊天。 Set this to FALSE to prohibit all chat.将此设置为 FALSE 以禁止所有聊天。

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.在此示例中,配置了两个不同的属性值:AllowUserChat 设置为 false,AllowMemes 设置为 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 https://learn.microsoft.com/en-us/powershell/module/skype/set-csteamsmessagingpolicy?view=skype-ps

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过 Powershell 在 Microsoft Teams 中添加多个成员 - Adding multiple members in Microsoft Teams through Powershell 如何通过 PowerShell 7 在 Windows 证书存储中设置证书权限? - How do you set permissions on a certificate in the Windows Certificate Store through PowerShell 7? 通过非交互式 powershell 脚本连接到 Microsoft Teams - Connecting to Microsoft Teams through non-interactive powershell script 如何在 powershell 中为团队执行嵌套循环 - How can I do nested loops in powershell for teams 如何通过PowerShell设置SharePoint托管的应用程序的权限? - How do I set a SharePoint-hosted app's permissions via PowerShell? 无法通过PowerShell设置应用程序的权限 - Unable to set the permissions of an app through PowerShell 在 Powershell 中通过 CLI 设置 Azure Devops 权限 - Set Azure Devops Permissions through CLI in Powershell 如果用户不是某个安全组的成员,如何从 Teams 共享频道中删除用户? - How do I remove a User from a Teams Shared Channel if they are not a member of a certain security group? 如何通过 PowerShell 获取 Microsoft Teams 使用报告 - How to get Microsoft Teams usage-report via PowerShell 如何使用 PowerShell 和 Microsoft Teams webhook 在新行上创建 output 数组 - How to output array on new lines using PowerShell and Microsoft Teams webhook
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM