Skip to content

Latest commit

 

History

History
423 lines (355 loc) · 9.18 KB

File metadata and controls

423 lines (355 loc) · 9.18 KB

Set-AdoTeamSettings

SYNOPSIS

Updates the settings for a team in Azure DevOps.

SYNTAX

DefaultIterationMacro

Set-AdoTeamSettings [[-CollectionUri] <string>] [[-ProjectName] <string>] [-Name] <string>
 [[-BacklogIteration] <string>] [[-BacklogVisibilities] <object>] [[-BugsBehavior] <string>]
 [[-DefaultIterationMacro] <string>] [[-WorkingDays] <string[]>] [[-Version] <string>] [<CommonParameters>]

DefaultIteration

Set-AdoTeamSettings [[-CollectionUri] <string>] [[-ProjectName] <string>] [-Name] <string>
 [[-BacklogIteration] <string>] [[-BacklogVisibilities] <object>] [[-BugsBehavior] <string>]
 [[-DefaultIteration] <string>] [[-WorkingDays] <string[]>] [[-Version] <string>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases,

  • N/A

DESCRIPTION

This cmdlet updates the settings for a team in Azure DevOps by sending a PATCH request to the Azure DevOps REST API. You can update working days, bugs behavior, backlog iteration, and backlog visibilities.

EXAMPLES

EXAMPLE 1

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
    ProjectName   = 'my-project-1'
    Name          = 'my-team-1'
    BugsBehavior  = 'asRequirements'
    WorkingDays   = @('monday', 'tuesday', 'wednesday', 'thursday', 'friday')
}
Set-AdoTeamSettings @params

Updates the team settings to treat bugs as requirements and set working days.

EXAMPLE 2

PowerShell

$params = @{
    CollectionUri        = 'https://dev.azure.com/my-org'
    ProjectName          = 'my-project-1'
    Name                 = 'my-team-1'
    BacklogVisibilities  = @{
        'Microsoft.EpicCategory'        = $false
        'Microsoft.FeatureCategory'     = $true
        'Microsoft.RequirementCategory' = $true
    }
}
Set-AdoTeamSettings @params

Updates the backlog visibilities for the team.

EXAMPLE 3

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
    ProjectName   = 'my-project-1'
    BugsBehavior  = 'asRequirements'
    WorkingDays   = @('monday', 'tuesday', 'wednesday')
}
@(
    'my-team-1',
    'my-team-2'
) | Set-AdoTeamSettings @params

Updates multiple teams to treat bugs as requirements and set working days using pipeline input.

PARAMETERS

-CollectionUri

Optional. The collection URI of the Azure DevOps collection/organization, e.g., https://dev.azure.com/my-org.

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

-ProjectName

Optional. The ID or name of the project. If not specified, the default project is used.

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

-Name

Mandatory. The ID or name of the team to update settings for.

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

-BacklogIteration

Optional. The id (uuid) of the iteration to use as the backlog iteration.

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

-BacklogVisibilities

Optional. Object with backlog level visibilities (e.g., @{'Microsoft.EpicCategory' = $true}).

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

-BugsBehavior

Optional. How bugs should behave. Valid values: 'off', 'asRequirements', 'asTasks'.

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

-DefaultIteration

Optional. The default iteration id (uuid) for the team. Cannot be used together with DefaultIterationMacro.

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

-DefaultIterationMacro

Optional. Default iteration macro (e.g., '@currentIteration'). Used to set the default iteration dynamically. Cannot be used together with DefaultIteration.

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

-WorkingDays

Optional. Array of working days for the team (e.g., 'monday', 'tuesday', 'wednesday').

Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: DefaultIterationMacro
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
- Name: DefaultIteration
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- sunday
- monday
- tuesday
- wednesday
- thursday
- friday
- saturday
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: DefaultIterationMacro
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
- Name: DefaultIteration
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- 7.1
- 7.2-preview.1
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