Forum Discussion
Daniel Smith
Mar 23, 2020Copper Contributor
PowerShell in Teams for Members of a Messaging Policy
Dear All I can use PowerShell to see what Messaging Policy a single user belongs to: Get-CsOnlineUser -Identity jbloggs | Format-Table UserPrincipalName, TeamsMessagingPolicy How do I see...
LinusCansby
Mar 23, 2020MVP
Hi,
This should work:
Get-CsOnlineUser | Where-Object {$_.TeamsMessagingPolicy -eq "Students - No Chat"} | fl Identity,TeamsMessagingPolicy
And to set it back to Global use:
Get-CsOnlineUser | Where-Object {$_.TeamsMessagingPolicy -eq "Students - No Chat"} | Grant-CsTeamsMessagingPolicy -PolicyName $nullCLadmin
Mar 23, 2020Copper Contributor
Can I use powershell to apply message policy to a group? I dont want to go into every students account and add that policy? I do have all the students in a group called "Students"
Any help would be awesome!
- LinusCansbyMar 24, 2020MVP
CLadmin Yes that is possible, you have to use the preview module of Microsoft Teams Powershell. Check this article from paul-lange
https://paul-lange.net/assign-policies-in-microsoft-teams-the-easy-way/