Forum Discussion
How to show assigned (Teams) policies per user with PowerShell?
Due to the Teams Admin Center having some performance issues, i used PowerShell to create and assign a specific policy:
New-CsTeamsMeetingPolicy -Identity "No Lobby" -AutoAdmittedUsers Everyone
Grant-CsTeamsMeetingPolicy -PolicyName "No Lobby" -Identity "someuser@somedomain.com"
However, i seem not to find a PowerShell cmdlet that gives me the list of assigned/active policies per user. How would this be possible?
I can see this in the Admin Portal under https://admin.teams.microsoft.com/users and then dive into each user and check there. But a PowerShell cmdlet would be nice, especially if the Admin portal is slow'ish...
Thanks for a pointer.
Dan
2 Replies
- DanHuberIron Contributor
In the meantime, I found this:
Get-CsOnlineUser -Filter {TeamsMeetingPolicy -eq 'No Lobby'} | Select UserPrincipalName, TeamsMeetingPolicy
This would give me each user that this policy is applied. But I would have to know the policy name beforehand.
Get-CsOnlineUser -identity someuser | Select *Teams*Policy*
I would expect that this would get me all Teams related policies for the user "someuser". However, the default policies are missing....
- bwilson
Microsoft
You can run the following without any parameters to show all policies created in the tenant:
https://docs.microsoft.com/en-us/powershell/module/skype/get-csteamsmeetingpolicy?view=skype-ps