Skip to content

Latest commit

 

History

History
304 lines (243 loc) · 6.18 KB

File metadata and controls

304 lines (243 loc) · 6.18 KB

Get-AdoProject

SYNOPSIS

Retrieves Azure DevOps project details.

SYNTAX

ListProjects (Default)

Get-AdoProject [[-CollectionUri] <string>] [[-Skip] <int>] [[-Top] <int>]
 [[-StateFilter] <string>] [[-Version] <string>] [<CommonParameters>]

ByNameOrId

Get-AdoProject [[-CollectionUri] <string>] [[-Name] <string[]>] [-IncludeCapabilities]
 [-IncludeHistory] [[-Version] <string>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases,

  • N/A

DESCRIPTION

This cmdlet retrieves details of one or more Azure DevOps projects within a specified organization. You can retrieve all projects, a specific project by name or id, and control the amount of data returned using pagination parameters.

EXAMPLES

EXAMPLE 1

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
}
Get-AdoProject @params -Top 5

Retrieves the first 5 projects from the specified organization.

EXAMPLE 2

PowerShell

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

Retrieves the specified project by name.

EXAMPLE 3

PowerShell

$params = @{
    CollectionUri = 'https://dev.azure.com/my-org'
}
@('my-project-1', 'my-project-2') | Get-AdoProject @params -Verbose

Retrieves multiple projects by name demonstrating 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: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Name

Optional. The name or id of the project to retrieve. If not provided, retrieves all projects.

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

-IncludeCapabilities

Optional. Include capabilities (such as source control) in the team project result. Default is 'false'.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByNameOrId
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-IncludeHistory

Optional. Search within renamed projects (that had such name in the past). Default is 'false'.

Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByNameOrId
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Skip

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

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

-Top

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

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

-StateFilter

Optional. A filter for the project state. Possible values are 'deleting', 'new', 'wellFormed', 'createPending', 'all', 'unchanged', 'deleted'.

Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ListProjects
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- deleting
- new
- wellFormed
- createPending
- all
- unchanged
- deleted
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.4
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