Skip to main content

Get-VSTeamPackageVersion

SYNOPSIS

Returns a list of versions for a package.

SYNTAX

Get-VSTeamPackageVersion [-feedId] <String> [-packageId] <Guid> [-hideUrls] [-ProjectName <String>]
[<CommonParameters>]

DESCRIPTION

Returns a list of versions for a package.

EXAMPLES

Example 1: Get from pipeline

Get-VSTeamPackage vsteam -top 1 | Get-VSTeamPackageVersion

This command returns all the versions for all the package returned by Get-VSTeamPackage.

Example 2: Get using parameters

$p = Get-VSTeamPackage vsteam -top 1
Get-VSTeamPackageVersion -feedId $($p.FeedId) -packageId $($p.Id)

This command returns all the versions for the packageId.

Example 3: Get version from package in project feed

Get-VSTeamPackageVersion -feedId 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d -packageId 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d -projectName MyProject

This command returns all the versions for the packageId in the project feed.

PARAMETERS

-ProjectName

Specifies the team project for which this function operates.

You can tab complete from a list of available projects.

You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-feedId

Name or Id of the feed.

Type: String
Parameter Sets: (All)
Aliases: feedName

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-hideUrls

Do not return REST Urls with the response.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-packageId

The package Id (GUID Id, not the package name).

Type: Guid
Parameter Sets: (All)
Aliases: id

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

CommonParameters

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

INPUTS

OUTPUTS

NOTES

Prerequisites:

Set the account and version that all calls will use with Set-VSTeamAccount. Default version sets to API version 3.0 (TFS2017) if not manually set.

tips:

  • check called version of the API with Get-VSTeamAPIVersion or Get-VSTeamInfo
  • use Set-VSTeamDefaultProject to set default project for every call
  • use Set-VSTeamDefaultAPITimeout to change the default timeout of 60 seconds for all calls.
  • use Profiles to load an account and the correct version

Add-VSTeamFeed