Edit

Share via


Get-AzAutomationConnection

Gets an Automation connection.

Syntax

ByAll (Default)

Get-AzAutomationConnection
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByConnectionName

Get-AzAutomationConnection
    [-Name] <String>
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

ByConnectionTypeName

Get-AzAutomationConnection
    [-ConnectionTypeName] <String>
    [-ResourceGroupName] <String>
    [-AutomationAccountName] <String>
    [-DefaultProfile <IAzureContextContainer>]
    [<CommonParameters>]

Description

The Get-AzAutomationConnection cmdlet gets one or more Azure Automation connections. By default, this cmdlet retrieves all connections. Specify the name of a connection to get a specific connection. Specify the connection type name to get all connections of a specific type.

Examples

Example 1: Get all connections

Get-AzAutomationConnection -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17"

This command gets metadata for all connections in the Automation account named Contoso17.

Example 2: Get all connections of a type

Get-AzAutomationConnection -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17" -ConnectionTypeName "SqlServer"

This command gets metadata for connections in the Automation account named Contoso17. This command gets connections of the type SqlServer.

Example 3: Get a connection

Get-AzAutomationConnection -ResourceGroupName "ResourceGroup01" -AutomationAccountName "Contoso17" -Name "ContosoConnection"

This command gets metadata for the connection named ContosoConnection.

Parameters

-AutomationAccountName

Specifies the name of the Automation account for which this cmdlet gets connections.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ConnectionTypeName

Specifies the name of a connection type for which this cmdlet retrieves connections.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByConnectionTypeName
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of a connection that this cmdlet retrieves.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByConnectionName
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceGroupName

Specifies the name of a resource group for which this cmdlet gets connections.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

Outputs

Connection