< Back

Get-OctopusMachine

Sat Jan 18, 2020 5:25 pm

NAME Get-OctopusMachine



SYNOPSIS

This cmdlet returns info about Octopus Targets (Tentacles, cloud regions, Offline deployment targets, SHH)





SYNTAX

Get-OctopusMachine [[-MachineName] <string[]>] [-ResourceOnly <SwitchParameter>] [<CommonParameters>]



Get-OctopusMachine [-EnvironmentName <string[]>] [-ResourceOnly <SwitchParameter>] [<CommonParameters>]



Get-OctopusMachine [-ResourceOnly <SwitchParameter>] [-URL <string[]>] [<CommonParameters>]



Get-OctopusMachine [-CommunicationStyle <string>] [-ResourceOnly <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

This cmdlet returns info about Octopus Targets (Tentacles, cloud regions, Offline deployment targets, SHH)





PARAMETERS

-MachineName <string[]>

Name of the Machine to filter by



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Name <string[]>

Name of the Machine to filter by



This is an alias of the MachineName parameter.



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue)

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



-URL <string[]>

Target URI to filter by



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-URI <string[]>

Target URI to filter by



This is an alias of the URL parameter.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-CommunicationStyle <string>

Target communication style to filter by



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Mode <string>

Target communication style to filter by



This is an alias of the CommunicationStyle parameter.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

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



<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 Machine to filter by



System.String[]

Name of the Environment to filter by



System.String[]

Target URI to filter by



System.String

Target communication style to filter by





OUTPUTS

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

Culture=neutral, PublicKeyToken=null]]



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

Culture=neutral, PublicKeyToken=null]]





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



PS C:\\> Get-OctopusMachine -name "Database_Prod"



Gets the machine with the name "Database_Prod"

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



PS C:\\> Get-OctopusMachine -name "*_Prod"



Gets all the machines which name is like "*_Prod"

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



PS C:\\> Get-OctopusMachine -EnvironmentName "Staging","UAT""



Gets all the machines on the environments "Staging","UAT"

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



PS C:\\> Get-OctopusMachine -URL "*:10933"



Gets all the machines with the string "*:10933" at the end of the URL

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



PS Get-OctopusMachine -Mode Listening



Gets all the machines registered in "Listening" mode. "Polling" is also a valid value



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