Skip to content

Commit

Permalink
status (#3371)
Browse files Browse the repository at this point in the history
  • Loading branch information
meganbradley authored Dec 2, 2024
1 parent 8b4be5a commit 8f2884d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 4 additions & 6 deletions azps-13.0.0/Az.Automation/New-AzAutomationConnection.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The **New-AzAutomationConnection** cmdlet creates a connection in Azure Automati

### Example 1: Create a connection for ConnectionTypeName=Azure
```powershell
$FieldValues = @{"AutomationCertificateName"="ContosoCertificate";"SubscriptionID"="81b59010-dc55-45b7-89cd-5ca26db62472"}
$FieldValues = @{"AutomationCertificateName"="ContosoCertificate";"SubscriptionID"="aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"}
New-AzAutomationConnection -Name "Connection12" -ConnectionTypeName Azure -ConnectionFieldValues $FieldValues -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"
```

Expand All @@ -39,9 +39,9 @@ The command uses the connection field values in $FieldValues.
### Example 2: Create a connection for ConnectionTypeName=AzureServicePrincipal
```powershell
$Thumbprint = "0SZTNJ34TCCMUJ5MJZGR8XQD3S0RVHJBA33Z8ZXV"
$TenantId = "00001111-aaaa-2222-bbbb-3333cccc4444"
$TenantId = "aaaabbbb-0000-cccc-1111-dddd2222eeee"
$ApplicationId = "00001111-aaaa-2222-bbbb-3333cccc4444"
$SubscriptionId = "81b59010-dc55-45b7-89cd-5ca26db62472"
$SubscriptionId = "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
$RunAsAccountConnectionFieldValues = @{"ApplicationId" = $ApplicationId; "TenantId" = $TenantId; "CertificateThumbprint" = $Thumbprint; "SubscriptionId" = $SubscriptionId}
New-AzAutomationConnection -Name "Connection13" -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $RunAsAccountConnectionFieldValues -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"
```
Expand All @@ -52,7 +52,7 @@ This ConnectionTypeName=AzureServicePrincipal is mainly used for Azure Run As Ac
### Example 3: Create a connection for ConnectionTypeName=AzureClassicCertificate
```powershell
$SubscriptionName = "MyTestSubscription"
$SubscriptionId = "81b59010-dc55-45b7-89cd-5ca26db62472"
$SubscriptionId = "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
$ClassicRunAsAccountCertifcateAssetName = "AzureClassicRunAsCertificate"
$ClassicRunAsAccountConnectionFieldValues = @{"SubscriptionName" = $SubscriptionName; "SubscriptionId" = $SubscriptionId; "CertificateAssetName" = $ClassicRunAsAccountCertifcateAssetName}
New-AzAutomationConnection -Name "Connection14" -ConnectionTypeName AzureClassicCertificate -ConnectionFieldValues $ClassicRunAsAccountConnectionFieldValues -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"
Expand Down Expand Up @@ -190,5 +190,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
[Get-AzAutomationConnection](./Get-AzAutomationConnection.md)
[Remove-AzAutomationConnection](./Remove-AzAutomationConnection.md)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The **Set-AzAutomationConnectionFieldValue** cmdlet modifies the value of a fiel

### Example 1: Change a field value in a connection
```powershell
Set-AzAutomationConnectionFieldValue -Name "ContosoConnection" -ConnectionFieldName "SubscriptionID" -Value "b53ec456-3494-4847-8f2b-180901c51050" -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"
Set-AzAutomationConnectionFieldValue -Name "ContosoConnection" -ConnectionFieldName "SubscriptionID" -Value "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e" -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01"
```

This command changes the subscription ID for the Azure connection named ContosoConnection in the Automation account named AutomationAccount01.
Expand Down Expand Up @@ -143,5 +143,3 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
## RELATED LINKS
[New-AzAutomationConnection](./New-AzAutomationConnection.md)

0 comments on commit 8f2884d

Please sign in to comment.