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
Thanks
- 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"- supportsibBrass ContributorHi,
I am filtering for specific teams , still it is taking around 2-3 minute
get-team |where-object { $_.mailnickname -eq $team.TeamsName}
Thanks- You are filtering client side, this means PowerShell will need to fetch the full list of teams anyway. Use the example above.