17 February 2022

Reset the Teamsmeetingpolicy to "Global" for all users

Some users reported that they couldn't use certain features, such as "transcription".

When comparing myself with the affected user I noticed that my Teamsmeetingpolicy had no policy set.
I would expected it to show "Global". Turns out the "Global policy" isn't a user policy and therefore doesn't show up with a name.

The affected user did have a policy set: "RestricetedAnonymousAccess".

Now I had to give those users the "Global" Teamsmeetingpolicy and came up with this:

 1
2
3
4
5
6
7
$users = Get-CsOnlineUser -ResultSize unlimited
foreach($User in $Users)
{
$userId = $User.UserPrincipalName
Write-Host $userId
Grant-CsTeamsMeetingPolicy -Identity $userId -PolicyName $Null -ErrorAction SilentlyContinue
}

This resets all users to no policy and thus the "Global" policy.

Maybe it is a bit much for large environments, it takes quite a long time to run.
With some filtering this could be done quicker.

 1
2
3
4
5
6
7
$users = Get-CsOnlineUser -ResultSize unlimited -Filter {Teamsmeetingpolicy -ne $null}
foreach($User in $Users)
{
$userId = $User.UserPrincipalName
Write-Host $userId
Grant-CsTeamsMeetingPolicy -Identity $userId -PolicyName $Null -ErrorAction SilentlyContinue
}

No comments:

Post a Comment