Skip to content

Latest commit

 

History

History
244 lines (189 loc) · 4.8 KB

File metadata and controls

244 lines (189 loc) · 4.8 KB

Get-AdoTeam

SYNOPSIS

Retrieves Azure DevOps team details.

SYNTAX

ListTeams (Default)

Get-AdoTeam [[-CollectionUri] <string>] [[-ProjectName] <string>] [[-Skip] <int>]
 [[-Top] <int>] [[-Version] <string>] [<CommonParameters>]

ByNameOrId

Get-AdoTeam [[-CollectionUri] <string>] [[-ProjectName] <string>] [[-Name] <string>]
 [[-Version] <string>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases,

  • N/A

DESCRIPTION

This cmdlet retrieves details of one or more Azure DevOps teams within a given project. You can retrieve all teams in a project, or specific teams by name or ID. Supports pagination when retrieving all teams.

EXAMPLES

EXAMPLE 1

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
    ProjectName   = 'my-project-1'
}
Get-AdoTeam @params

Retrieves all teams from the specified project.

EXAMPLE 2

PowerShell

Get-AdoTeam -Name 'my-team'

Retrieves the specified team using default CollectionUri and ProjectName from environment variables.

EXAMPLE 3

PowerShell

'team-1' | Get-AdoTeam -ProjectName 'my-project-1'

Retrieves a team demonstrating pipeline input.

PARAMETERS

-CollectionUri

The collection URI of the Azure DevOps collection/organization. Defaults to the value of $env:DefaultAdoCollectionUri if not provided.

Type: System.String
DefaultValue: $env:DefaultAdoCollectionUri
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-ProjectName

The ID or name of the project. Defaults to the value of $env:DefaultAdoProject if not provided.

Type: System.String
DefaultValue: $env:DefaultAdoProject
SupportsWildcards: false
Aliases:
- ProjectId
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

The ID or name of the team to retrieve. If not provided, retrieves all teams.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- TeamName
- Id
- TeamId
ParameterSets:
- Name: ByNameOrId
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Skip

The number of teams to skip. Used for pagination when retrieving all teams.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ListTeams
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Top

The number of teams to retrieve. Used for pagination when retrieving all teams.

Type: System.Int32
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ListTeams
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Version

The API version to use for the request. Default is '7.1'.

Type: System.String
DefaultValue: 7.1
SupportsWildcards: false
Aliases:
- ApiVersion
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- 7.1
- 7.2-preview.3
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • System.String

OUTPUTS

PSCustomObject

NOTES

  • Both CollectionUri and ProjectName parameters can be set as environment variables ($env:DefaultAdoCollectionUri and $env:DefaultAdoProject) to avoid specifying them in each call

RELATED LINKS