New-​Azure​Rm​Automation​Connection

Creates an Automation connection.

Syntax

New-AzureRmAutomationConnection
   [-ResourceGroupName] <String>
   [-AutomationAccountName] <String>
   [-Name] <String>
   [-ConnectionTypeName] <String>
   [-ConnectionFieldValues] <IDictionary>
   [-Description <String>]
   [<CommonParameters>]

Description

The New-AzureRmAutomationConnection cmdlet creates a connection in Azure Automation.

Examples

Example 1: Create a connection

PS C:\>$FieldValues = @{"AutomationCertificateName"="ContosoCertificate";"SubscriptionID"="81b59010-dc55-45b7-89cd-5ca26db62472"}
PS C:\> New-AzureRmAutomationConnection -Name "Connection12" -ConnectionTypeName Azure -ConnectionFieldValues $FieldValues -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"

The first command assigns a hash table of field values to the $FieldValue variable.

The second command creates an Azure connection named Connection12 in the Automation account named AutomationAccount01. The command uses the connection field values in $FieldValues.

Required Parameters

-AutomationAccountName

Specifies the name of the Automation account for which this cmdlet creates a connection.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ConnectionFieldValues

Specifies a hash table that contains key/value pairs. The keys represent the connection fields for the specified connection type. The values represent the specific values of each connection field for the connection instance.

Type:IDictionary
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ConnectionTypeName

Specifies the name of the connection type.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

Specifies a name for the connection.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group for which this cmdlet creates a connection.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Description

Specifies a description for the connection.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Automation.Model.Connection