external help file | Module Name | online version | schema | author | ms.author | ms.reviewer |
---|---|---|---|---|---|---|
Microsoft.TeamsCmdlets.PowerShell.Custom.dll-Help.xml |
MicrosoftTeams |
2.0.0 |
serdarsoysal |
serdars |
This cmdlet supports retrieving teams with particular properties/information, including all teams that a specific user belongs to, all teams that have been archived, all teams with a specific display name, or all teams in the organization.
Get-Team -GroupId <String> [-User <String>] [-Archived <Boolean>] [-Visibility <String>]
[-DisplayName <String>] [-MailNickName <String>] [<CommonParameters>] [-NumberOfThreads <Int32>]
Get-Team [-User <String>] [-Archived <Boolean>] [-Visibility <String>] [-DisplayName <String>]
[-MailNickName <String>] [<CommonParameters>] [-NumberOfThreads <Int32>]
This cmdlet supports retrieving teams with particular properties/information, including all teams that a specific user belongs to, all teams that have been archived, all teams with a specific display name, or all teams in the organization.
Note
Get-Team may return multiple results matching the input and not just the exact match for attributes like DisplayName/MailNickName. This is known behavior.
PS> Get-Team -User dmx1@example.com
Returns all teams that a user (dmx1@example.com) belongs to
PS> Get-Team -Archived $true -Visibility Private
Returns all teams that are private and have been archived.
PS> Get-Team -MailNickName "BusinessDevelopment"
Returns the team with the specified MailNickName. (This acts as a filter rather than an exact match.)
PS> Get-Team -DisplayName "Sales and Marketing"
Returns the team that includes the specified text in its DisplayName. (This acts as a filter rather than an exact match).
PS> $team=[uri]::EscapeDataString('AB&C')
PS> Get-Team -DisplayName $team
Returns the team that includes the specified escaped representation of its DisplayName, useful when the DisplayName has special characters. (This acts as a filter rather than an exact match.)
User's UPN (user principal name - e.g. johndoe@example.com)
Type: String
Parameter Sets: Identity
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: Filters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If $true, filters to return teams that have been archived. If $false, filters to return teams that have not been archived. Do not specify any value to return teams that match filter regardless of archived state. This is a filter rather than an exact match.
Type: Boolean
Parameter Sets: Identity
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: Boolean
Parameter Sets: Filters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify this parameter to return teams with the provided display name as a filter. As the display name is not unique, multiple values can be returned. Note that this filter value is case-sensitive.
Type: String
Parameter Sets: Identity
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: Filters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the specific GroupId (as a string) of the team to be returned. This is a unique identifier and returns exact match.
Type: String
Parameter Sets: Identity
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the mailnickname of the team that is being returned. This acts as a filter instead of being an exact match.
Type: String
Parameter Sets: Identity
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: Filters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Filters to return teams with a set "visibility" value. Accepted values are "Public", "Private" or "HiddenMembership". Do not specify any value to return teams that match filter regardless of visibility. This is a filter rather than an exact match.
Type: String
Parameter Sets: Identity
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: Filters
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the number of threads to use. If you have sufficient network bandwidth and want to decrease the time required to retrieve the list of teams, use the -NumberOfThreads parameter, which supports a value from 1 through 20.
Type: Int32
Parameter Sets: All
Aliases:
Required: False
Position: Named
Default value: 20
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).