Last active
May 28, 2021 07:14
-
-
Save pmatthews05/0165fbc6ccb91e53a2e26efea1f02156 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-host "Teams Meeting Policy" | |
Get-CsOnlineUser -Filter {TeamsMeetingPolicy -eq 'GivenPolicyNameBlankForGlobal'} | Select UserPrincipalName |
Cheers, I will take a look later. You connect like below?
Install-Module MicrosoftTeams
$credential = Get-Credential
#Connect to Microsoft Teams
Connect-MicrosoftTeams -Credential $credential
Get-CsOnlineUser -Filter {TeamsAppPermissionPolicy -eq "Global NoApps"} | Select UserPrincipalName
One last thought, you haven't removed/deleted the original Global policy?
I think for the Teams Module they have updated this code. So you use $null instead of blank or Global.
Get-CsOnlineUser -Filter {TeamsAppPermissionPolicy -eq $null} | Select UserPrincipalName
Let me know if that works for you.
Thank you so far. I will try tomorrow and report back. Have a nice day.
$null works! Thank you very much!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version 2.3.1 MicrosoftTeams
The Code is just:
Get-CsOnlineUser -Filter {TeamsAppPermissionPolicy -eq ""} | Select UserPrincipalName
I also tried:
Get-CsOnlineUser -WarningAction SilentlyContinue | Where-Object { $_.TeamsAppPermissionPolicy -eq ""} | Select UserPrincipalName
And this line works as intended:
Get-CsOnlineUser -Filter {TeamsAppPermissionPolicy -eq "Global NoApps"} | Select UserPrincipalName
Thank you for your help!