Get-VSTeamPackage
SYNOPSIS
Returns a list of packages for a feed.
SYNTAX
List (Default)
Get-VSTeamPackage [-feedId] <String> [-includeAllVersions] [-includeDeleted] [-includeDescription] [-hideUrls]
[-protocolType <String>] [-packageNameQuery <String>] [-Top <Int32>] [-Skip <Int32>] [-ProjectName <String>]
[<CommonParameters>]
ById
Get-VSTeamPackage [-feedId] <String> [-packageId] <Guid> [-includeAllVersions] [-includeDeleted]
[-includeDescription] [-hideUrls] [-ProjectName <String>] [<CommonParameters>]
DESCRIPTION
Returns a list of packages for a feed.
EXAMPLES
Example 1: List all package and versions
Get-VSTeamFeed | Get-VSTeamPackage -includeAllVersions
This command returns all the packages for all the feeds returned by Get-VSTeamFeed.
Example 2: List only NuGet packages
Get-VSTeamFeed | Get-VSTeamPackage -protocolType NuGet
This command only returns NuGet packages for all the feeds returned by Get-VSTeamFeed.
Example 3: Return only the second package
Get-VSTeamPackage -feedName vsteam -Top 1 -Skip 1
This command returns the second package from the feed named vsteam
Example 4: Return only packages and versions from project
Get-VSTeamPackage -feedId 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d -projectName MyProject
This command returns all the packages and versions for the feedId in the project.
PARAMETERS
-Skip
Skip the first N packages (or package versions when GetTopPackageVersions is set)
Type: Int32
Parameter Sets: List
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Top
Get the top N packages (or package versions when GetTopPackageVersions is set)
Type: Int32
Parameter Sets: List
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-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
-includeAllVersions
Returns all versions of the package in the response. Default is latest version only.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-includeDeleted
Return deleted or unpublished versions of packages in the response.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-includeDescription
Return the description for every version of each package in 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: ById
Aliases: id
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-packageNameQuery
Filter to packages that contain the provided string. Characters in the string must conform to the package name constraints.
Type: String
Parameter Sets: List
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-protocolType
One of the supported artifact package types.
Type: String
Parameter Sets: List
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
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