Get-Team -User PowerShell for Teams

Occasional Contributor



I created a test environment on to test the Teams PS commands. 


I have the Team PowerShell version 1.0 installed.  When I run the following command it displays all teams rather than the ones the user is a member of.  I tried several users, which have different memberships, however the command just returns all the groups.


Ex: Get-Team -User


Can anyone help?

8 Replies
Hmmm. Strange behaviour!

It actually specifies

Example 1
PS> Get-Team -User
Returns all teams that a user ( belongs to

Perhaps this is a bug? May be worth a ticket?

Best, Chris
Which version of the module are you using? I cannot reproduce the issue with 1.0.0.

@Jeremy Miller 

Module is 1.0.0

Please see details:

All teams listed below on my test environment:
all teams.PNG

added users to specific teams



However, using the command Get-Team -User <user> displays all teams rather than the ones that the users are a member of.




@aphamer I've been testing and still cannot recreate but it is obviously happening for you as indicated by the screenshots.  If you still have the issue it is probably worth opening a support ticket as mentioned by someone above.


@aphamer repeating the request to file a support ticket - we'd love to deep-dive what you're experiencing to see if there's a bug that needs fixing!


@aphamer I have just run this command and it returned a list of teams that I am a member of instead of the specified user. Is it possible that you are a member of all those teams and thats the bug? Or maybe my bug is different to yours?


I am experiencing the same issue with 1.0.2


Get-Team -User <username> regardless of whom I put it only ever returns my own teams (i.e. the account I connected with) although I am a global admin. 


Get-Team with no -User parameter return all teams.


Anyone find a fix for this?