You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过PowerShell设置Microsoft Teams常规频道消息发布权限

使用PowerShell配置Microsoft Teams「常规」频道为「仅所有者可发布消息」

前置准备

确保已安装Microsoft Teams PowerShell模块,未安装可执行以下命令:

Install-Module -Name MicrosoftTeams -Force -AllowClobber

操作步骤

  1. 连接到Microsoft Teams PowerShell
    执行命令并按提示完成身份验证(需具备Teams团队管理员权限):
Connect-MicrosoftTeams
  1. 获取目标团队的GroupId
    替换"你的团队显示名称"为实际团队名称,执行命令获取团队ID:
$team = Get-Team -DisplayName "你的团队显示名称"
$groupId = $team.GroupId

若存在同名团队,建议直接通过Azure AD或Teams管理后台获取精确的GroupId,避免匹配错误。

  1. 获取「常规」频道的ChannelId
    常规频道中文环境默认名称为「常规」,英文环境为General,执行命令获取频道ID:
$channel = Get-TeamChannel -GroupId $groupId -DisplayName "常规"
$channelId = $channel.Id
  1. 设置频道为「仅所有者可发布消息」
    执行命令禁用普通成员的消息发送权限,对应手动操作的权限设置:
Set-TeamChannelSettings -GroupId $groupId -CurrentDisplayName "常规" -MembersCanSendMessages $false

验证设置

执行以下命令确认配置生效:

Get-TeamChannelSettings -GroupId $groupId -CurrentDisplayName "常规" | Select-Object MembersCanSendMessages

返回结果为False即表示设置成功。

内容的提问来源于stack exchange,提问作者krishna

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 13:05:27