< Back

Get-OctopusDeployment

Sat Jan 18, 2020 5:25 pm

NAME Get-OctopusDeployment



SYNOPSIS

Gets information about Octopus deployments





SYNTAX

Get-OctopusDeployment [-After <DateTimeOffset>] [-Before <DateTimeOffset>] [-EnvironmentName <string[]>]

[-ProjectName <string[]>] [-ReleaseVersion <string[]>] [-ResourceOnly <SwitchParameter>] [<CommonParameters>]



Get-OctopusDeployment [-After <DateTimeOffset>] [-Before <DateTimeOffset>] [-EnvironmentName <string[]>]

[-LatestReleases <int>] [-ProjectName <string[]>] [-ResourceOnly <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

Gets information about Octopus deployments





PARAMETERS

-ReleaseVersion <string[]>

Release version to filter by. The cmdlet will only return deployments that belong to these releases



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Version <string[]>

Release version to filter by. The cmdlet will only return deployments that belong to these releases



This is an alias of the ReleaseVersion parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Release <string[]>

Release version to filter by. The cmdlet will only return deployments that belong to these releases



This is an alias of the ReleaseVersion parameter.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-LatestReleases <int>

Gets deployments by latest X releases



Required? false

Position? named

Default value 30

Accept pipeline input? false

Accept wildcard characters? false



-Latest <int>

Gets deployments by latest X releases



This is an alias of the LatestReleases parameter.



Required? false

Position? named

Default value 30

Accept pipeline input? false

Accept wildcard characters? false



-ResourceOnly <SwitchParameter>

If set to TRUE the cmdlet will return the basic Octopus resource. If not set or set to FALSE, the cmdlet will

return a human friendly Octoposh output object



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-EnvironmentName <string[]>

Name of the Environment to filter by



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Environment <string[]>

Name of the Environment to filter by



This is an alias of the EnvironmentName parameter.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-ProjectName <string[]>

Name of the Project to filter by



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Project <string[]>

Name of the Project to filter by



This is an alias of the ProjectName parameter.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Before <DateTimeOffset>

Target communication style to filter by



Required? false

Position? named

Default value 12/31/9999 11:59:59 PM +00:00

Accept pipeline input? false

Accept wildcard characters? false



-After <DateTimeOffset>

Target communication style to filter by



Required? false

Position? named

Default value 1/1/0001 12:00:00 AM +00:00

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

System.String[]

Name of the Environment to filter by



System.String[]

Name of the Project to filter by





OUTPUTS

System.Collections.Generic.List`1[[Octoposh.Model.OutputOctopusDeployment, Octoposh, Version=1.0.0.0,

Culture=neutral, PublicKeyToken=null]]



System.Collections.Generic.List`1[[Octopus.Client.Model.DeploymentResource, Octopus.Client, Version=4.22.0.0,

Culture=neutral, PublicKeyToken=null]]





---------- EXAMPLE 1 ----------



PS C:\\> Get-OctopusDeployment



Get all the deployments that were done on the Octopus Instance. You might wanna go grab a coffee after hitting

[enter] on this one, its gonna take a while.

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



PS C:\\> Get-OctopusDeployment -Project "MyProject" -ReleaseVersion 1.0.0



Get all the deployments that were done for the release 1.0.0 of the project "MyProject"

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



PS C:\\> Get-OctopusDeployment -EnvironmentName "Staging","UAT" -ProjectName "MyService"



Get all the deployents that were done to the environments Staging and UAT on the project "MyService"

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



PS C:\\> Get-OctopusDeployment -project "MyProduct.Webapp","MyProduct.service" -Environment "Production"



Get all the deployments that were done to the environment "Production" on the projects "MyProduct.webapp" and

"MyProduct.service"

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



PS Get-OctopusDeployment -project "MyProduct.Webapp" -Environment "Production" -After 2/20/2017 -Before 2/21/2017



Gets all the deployments for the project "MyProduct.WebApp" for the environment "Production" between 2/20/2017 and

2/21/2017



RELATED LINKS

WebSite: http://Octoposh.net

Github Project: https://github.com/Dalmirog/OctoPosh/

Wiki: http://octoposh.readthedocs.io

QA and Feature requests: https://gitter.im/Dalmirog/OctoPosh#initial