Command
Get-Team
Description
The command to get teams from a Microsoft 365 tenant.
Index
Examples
Get the tenant single team
Get-Team -Tenant $tenant
Get the tenant teams
Get-Team -Tenant $tenant -AllowMultiple
Get a team by name
Get-Team -Name "MyTeam" -Tenant $tenant
Get all teams with with the same name
Get-Team -Name "MyTeam" -Tenant $tenant -AllowMultiple
Get multiple teams by name
Get-Team -Name "FirstTeam", "SecondTeam" -Tenant $tenant
Get multiple teams by name using wildcards
Get-Team -Name "*Team" -Tenant $tenant -AllowMultiple
Get a team by id
Get-Team -Id "12345678-1234-1234-1234-123456789012" -Tenant $tenant
Get multiple teams by id
Get-Team -Id "11111111-1234-1234-1234-123456789012","22222222-1234-1234-1234-123456789012" -Tenant $tenant
Syntax
Get-Team
-Tenant <Tenant>
[-AllowMultiple <SwitchParameter>]
Get-Team
-Name <String[]> -Tenant <Tenant>
[-AllowMultiple <SwitchParameter>]
Get-Team
-Id <Guid[]> -Tenant <Tenant>
[-AllowMultiple <SwitchParameter>]
Parameters
-AllowMultiple <SwitchParameter>
Specifies that multiple teams can be returned by the command.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Id <Guid[]>
Specifies the id of the team.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Id |
Aliases | None |
-Name <String[]>
Specifies the name of the team (wildcards supported).
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | True |
Parameter set name | Name |
Aliases | None |
-Tenant <Tenant>
Specifies the SharePoint admin center site.
Required? | True |
Default value | None |
Accept pipeline input? | true (ByValue) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
Comments
1 comment
Hi ShareGate Team. Thank you for this article. Question: Can you get Teams by Owner? If so, what is the syntax, and what format does the Owner need to be in? Email address? Thanks!
Please sign in to leave a comment.