Forum Discussion

supportsib's avatar
supportsib
Brass Contributor
Aug 14, 2021

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"
    • supportsib's avatar
      supportsib
      Brass 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
      • VasilMichev's avatar
        VasilMichev
        MVP
        You are filtering client side, this means PowerShell will need to fetch the full list of teams anyway. Use the example above.

Resources