Forum Discussion
supportsib
Aug 14, 2021Brass Contributor
powershell and teams
Hi, I am trying the below snippet and powershell showing "fetiching % percentage " and it becoming very slow get-team |where-object { $_.mailnickname -eq $team.TeamsName} Please help Thank...
VasilMichev
Aug 15, 2021MVP
Help with what exactly? It's normal for the cmdlet to take some time to complete, especially in large organizations. Moreover, Teams PowerShell is not exactly known for it's speed. You can try calling the Graph API directly, or if you are looking for specific team, use filtering:
Get-Team -MailNickName "Marketing"
Get-Team -MailNickName "Marketing"
supportsib
Aug 19, 2021Brass Contributor
Hi,
I am filtering for specific teams , still it is taking around 2-3 minute
get-team |where-object { $_.mailnickname -eq $team.TeamsName}
Thanks
I am filtering for specific teams , still it is taking around 2-3 minute
get-team |where-object { $_.mailnickname -eq $team.TeamsName}
Thanks
- VasilMichevAug 19, 2021MVPYou are filtering client side, this means PowerShell will need to fetch the full list of teams anyway. Use the example above.