Skip to content

Latest commit

 

History

History
332 lines (263 loc) · 7.49 KB

File metadata and controls

332 lines (263 loc) · 7.49 KB

Get-AdoClassificationNode

SYNOPSIS

Gets classification nodes for a project in Azure DevOps.

SYNTAX

__AllParameterSets

Get-AdoClassificationNode [[-CollectionUri] <string>] [[-ProjectName] <string>] [[-StructureGroup] <string>] [[-Path] <string>] [[-Depth] <int>] [[-Version] <string>] [<CommonParameters>]

ByNodesIds

Get-AdoClassificationNode [[-CollectionUri] <string>] [[-ProjectName] <string>] -Ids <string[]> [[-ErrorPolicy] <string>] [[-Depth] <int>] [[-Version] <string>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases,

  • N/A

DESCRIPTION

This cmdlet retrieves classification nodes for a specified project in Azure DevOps. You can retrieve the root node, specific nodes by path with optional depth control, or multiple nodes by their IDs.

EXAMPLES

EXAMPLE 1

PowerShell

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

Retrieves the root area for the specified project.

EXAMPLE 2

PowerShell

$params = @{
    CollectionUri  = 'https://dev.azure.com/my-org'
    ProjectName    = 'my-project-1'
    StructureGroup = 'Areas'
    Path           = 'my-team-1/my-subarea-1'
    Depth          = 2
}
Get-AdoClassificationNode @params

Retrieves the area at the specified path with a depth of 2.

EXAMPLE 3

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
    ProjectName   = 'my-project-1'
    Ids           = 1, 2, 3
    ErrorPolicy   = 'omit'
}
Get-AdoClassificationNode @params

Retrieves multiple classification nodes by their IDs, omitting any not found.

EXAMPLE 4

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
    ProjectName   = 'my-project-1'
    Ids           = 1, 2, 3
    ErrorPolicy   = 'fail'
}
Get-AdoClassificationNode @params

Retrieves multiple classification nodes by their IDs, failing if any are not found.

EXAMPLE 5

PowerShell

$params = @{
    StructureGroup = 'Iterations'
    Path           = 'Sprint 1'
}
Get-AdoClassificationNode @params

Retrieves the iteration node at the specified path from the default project and collection.

PARAMETERS

-CollectionUri

Optional. The collection URI of the Azure DevOps collection/organization, e.g., https://dev.azure.com/my-org. Defaults to the value of the environment variable $env:DefaultAdoCollectionUri.

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

Optional. The ID or name of the Azure DevOps project. Defaults to the value of the environment variable $env:DefaultAdoProject.

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: ''

-StructureGroup

Optional. The structure group of the classification node. Valid values are 'Areas' or 'Iterations'. When not specified, all root classification nodes are returned.

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

-Path

Optional. The path of the classification node to retrieve. If not specified, the root classification node is returned.

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

-Ids

Optional. The unique identifiers of the classification nodes to retrieve. Used with the 'ByNodesIds' parameter set to retrieve multiple nodes by their IDs.

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

-ErrorPolicy

Optional. The error policy to apply when retrieving multiple nodes by IDs. Valid values are 'fail' and 'omit'. When set to 'fail', the request fails if any of the specified IDs are not found. When set to 'omit', nodes that are not found are omitted from the results.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByNodesIds
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- fail
- omit
HelpMessage: ''

-Depth

Optional. The depth of the classification nodes to retrieve. If not specified, only the specified node is returned.

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

-Version

Optional. 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.2
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

  • N/A

OUTPUTS

PSCustomObject

NOTES

  • Requires authentication to Azure DevOps. Use Set-AdoDefault to configure default organization and project values.
  • The cmdlet automatically retrieves authentication through Invoke-AdoRestMethod which calls New-AdoAuthHeader.

RELATED LINKS