< Back
Get-BMPackage
Post
NAME Get-BMPackage
SYNOPSIS
Gets a package from BuildMaster.
SYNTAX
Get-BMPackage -Session <Object> [<CommonParameters>]
Get-BMPackage -Session <Object> -Package <Object> [<CommonParameters>]
Get-BMPackage -Session <Object> -Release <Object> [<CommonParameters>]
DESCRIPTION
The `Get-BMPackage` function gets a package from BuildMaster. With no parameters, it returns all packages. To get
all the packages that are part of a release, pass a release object or ID to the `Release` property (a release
object must have an `id` or `Release_Id` property). To get a specific package, pass a package object or ID to the
`Package` property (a package object must have an `id` or `Package_Id` property).
This function uses BuildMaster's "Release & Package Deployment" API. When creating a BuildMaster session (using
the `New-BMSession` function), the API key you use must have access to that API.
PARAMETERS
-Session <Object>
A object that represents what instance of BuildMaster to connect to. Use the `New-BMSession` function to
create session objects.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Package <Object>
The package to get. Can be:
* A package object with a `Package_Id` or `id` property.
* A package ID (as an integer)
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Release <Object>
The release whose packages to get. Gets all the packages that are part of this release.
* A release object with a `Release_Id` or `id` property.
* A release ID (as an integer)
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-BMPackage -Session $session
Demonstrates how to get all packages.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-BMPackage -Session $session -Package $package
Demonstrates how to get a specific package using a package object. The package object must have an `id` or
`Package_Id` property.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-BMPackage -Session $session -Package 500
Demonstrates how to get a specific package using its ID.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-BMPackage -Session $session -Release $release
Demonstrates how to get all the packages that are part of a release using a release object. The release object
must have an `id` or `Release_Id` property.
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-BMPackage -Session $session -Release 438
Demonstrates how to get all the packages that are part of a release using the release's ID.
RELATED LINKS
SYNOPSIS
Gets a package from BuildMaster.
SYNTAX
Get-BMPackage -Session <Object> [<CommonParameters>]
Get-BMPackage -Session <Object> -Package <Object> [<CommonParameters>]
Get-BMPackage -Session <Object> -Release <Object> [<CommonParameters>]
DESCRIPTION
The `Get-BMPackage` function gets a package from BuildMaster. With no parameters, it returns all packages. To get
all the packages that are part of a release, pass a release object or ID to the `Release` property (a release
object must have an `id` or `Release_Id` property). To get a specific package, pass a package object or ID to the
`Package` property (a package object must have an `id` or `Package_Id` property).
This function uses BuildMaster's "Release & Package Deployment" API. When creating a BuildMaster session (using
the `New-BMSession` function), the API key you use must have access to that API.
PARAMETERS
-Session <Object>
A object that represents what instance of BuildMaster to connect to. Use the `New-BMSession` function to
create session objects.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Package <Object>
The package to get. Can be:
* A package object with a `Package_Id` or `id` property.
* A package ID (as an integer)
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Release <Object>
The release whose packages to get. Gets all the packages that are part of this release.
* A release object with a `Release_Id` or `id` property.
* A release ID (as an integer)
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-BMPackage -Session $session
Demonstrates how to get all packages.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-BMPackage -Session $session -Package $package
Demonstrates how to get a specific package using a package object. The package object must have an `id` or
`Package_Id` property.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-BMPackage -Session $session -Package 500
Demonstrates how to get a specific package using its ID.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-BMPackage -Session $session -Release $release
Demonstrates how to get all the packages that are part of a release using a release object. The release object
must have an `id` or `Release_Id` property.
-------------------------- EXAMPLE 5 --------------------------
PS C:\\>Get-BMPackage -Session $session -Release 438
Demonstrates how to get all the packages that are part of a release using the release's ID.
RELATED LINKS