I am disabling permissions for everyone to chat on "General" Teams channel manually by
- clicking on (...)
- Manage channel
- selecting 'Only owners can post messages'
How can I do the same with PowerShell without any manual clicks?.
I am disabling permissions for everyone to chat on "General" Teams channel manually by
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