Forum Discussion
RobinMalik
Jul 19, 2021Copper Contributor
PowerShell: Get-Team unreliable / returning incomplete results
Hi, We have multiple issues with the Get-Team cmdlet in the MicrosoftTeams module (v2.3.0). Like many organisations, we're programmatically creating Teams based on organisational data (e.g. one T...
Erwin_de_Jong
Feb 09, 2023Copper Contributor
UlrikSS
Any news about this? With the latest teams module (4.9.3) there are still issues when quering teams. It seems this has been an issue for quite some time now.
the help states that is only a filter but not an exact match which is unfortunately. It would speed up scripting much more if it would return an exact match.
Curious to know if still more people have issues with teams like that a TeamChannel is created but not the SharePoint folder that should come with it.
CloudSnout
Aug 02, 2023Copper Contributor
Erwin_de_Jong
The issue still persists but you can fix it with piping the output like below.
get-team -DisplayName $team.Name | Where-Object Displayname -eq $team.nameI totally agree that it shouldn't work like this, but it's a workaround.