< Back

Get-BMDeployment

Sun Jan 12, 2020 7:00 pm

NAME Get-BMDeployment



SYNOPSIS

Gets a deployment from BuildMaster.





SYNTAX

Get-BMDeployment -Session <Object> [<CommonParameters>]



Get-BMDeployment -Session <Object> -ID <Int32> [<CommonParameters>]



Get-BMDeployment -Session <Object> -Package <Object> [<CommonParameters>]



Get-BMDeployment -Session <Object> -Release <Object> [<CommonParameters>]



Get-BMDeployment -Session <Object> -Application <Object> [<CommonParameters>]





DESCRIPTION

The `Get-BMDeployment` function gets deployments in BuildMaster. It uses the [Release and Package Deployment

API](http://inedo.com/support/documentation/ ... nd-package).



To get a specific deployment, pass a deploymentID.



To get all the deployments for a specific package, pass a package object to the `Package` parameter (a package

object must have a `packageId` or `packageNumber` property).



To get all the deployments for a specific release, pass a release object to the `Release` parameter (a release

object must have a `releaseId` or `releaseName` property).



To get all the deployments for a specific application, pass an application object to the `Application` parameter

(an application object must have an `applicationId` or `applicationName` property).





PARAMETERS

-Session <Object>

A session object that contains the settings to use to connect to BuildMaster. Use `New-BMSession` to create

session objects.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ID <Int32>

The deployment to get. You can pass:



* A deployment ID (as an integer)



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Package <Object>

The package whose deployments to get. You can pass:



* A package ID as an integer

* A package name/number as a string.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Release <Object>

The release whose deployments to get. You can pass:



* The release ID as an integer.

* The release name as a string.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Application <Object>

The application whose deployments to get. You can pass:



* The application ID as an integer.

* The application name as a string.



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-BMDeployment -Session $session



Demonstrates how to get all deployments from the instance of BuildMaster.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-BMDeployment -Session $session -ID $deployment



Demonstrates how to get a specific deployment by passing a deployment object to the `Deployment` parameter. The

`Get-BMDeployment` function looks for an `id` property on the object.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-BMDeployment -Session $session -Package $package



Demonstrates how to get all deployments for a package by passing a package object to the `Package` parameter. The

`Get-BMDeployment` function looks for an `id` or `number` property on the object.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>Get-BMDeployment -Session $session -Release $release



Demonstrates how to get all deployments for a release by passing a release object to the `Release` parameter. The

`Get-BMDeployment` function looks for an `id` or `name` property on the object.









-------------------------- EXAMPLE 5 --------------------------



PS C:\\>Get-BMDeployment -Session $session -Application $app



Demonstrates how to get all deployments for an application by passing an application object to the `Application`

parameter. The `Get-BMDeployment` function looks for an `id` or `name` property on the object.









-------------------------- EXAMPLE 6 --------------------------



PS C:\\>Get-BMDeployment -Session $session -Application 34



Demonstrates how to get all deployments for an application by passing its ID to the `Application` parameter.











RELATED LINKS