Skip to content

Commit

Permalink
Aladdin generated examples for Automation (#12657)
Browse files Browse the repository at this point in the history
* Add new examples to Automation
	- Add new examples to the following modules:
		Automation

* Fix the existing examples.
  • Loading branch information
aladdindoc authored Aug 13, 2020
1 parent b9cdda1 commit 6daf098
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,23 @@ for the source control VSTSNative.
```powershell
PS C:\> Get-AzAutomationSourceControlSyncJob -ResourceGroupName "rg1" `
-AutomationAccountName "devAccount" `
-Name "VSTSNative"
-Id "08d6d266-27b6-463c-beea-bc48a67ace15"
-Name "VSTSNative" `
-JobId "08d6d266-27b6-463c-beea-bc48a67ace15"
Status SyncType Exception
------ -------- ---------
Failed FullSync There were errors while syncing the user runbooks. Please see error streams for more information. (T...
```

### Example 3

Gets Azure Automation source control sync jobs. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Get-AzAutomationSourceControlSyncJob -AutomationAccountName 'devAccount' -JobId 00000000-0000-0000-0000-00000000000000000 -ResourceGroupName 'rg1' -SourceControlName 'VSTSNative'
```

## PARAMETERS

### -AutomationAccountName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,23 @@ Specify the path of an APS script that contains a single DSC configuration.
## EXAMPLES

### Example 1: Import a DSC configuration into Automation
```
PS C:\>Import-AzAutomationDscConfiguration -AutomationAccountName "Contoso17"-ResourceGroupName "ResourceGroup01" -SourcePath "C:\DSC\client.ps1" -Force
```powershell
PS C:\>Import-AzAutomationDscConfiguration -AutomationAccountName "Contoso17" -ResourceGroupName "ResourceGroup01" -SourcePath "C:\DSC\client.ps1" -Force
```

This command imports the DSC configuration in the file named client.ps1 into the Automation account
named Contoso17. The command specifies the *Force* parameter. If there is an existing DSC
configuration, this command replaces it.

### Example 2

Imports a DSC configuration into Automation. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Import-AzAutomationDscConfiguration -AutomationAccountName 'Contoso17' -Published -ResourceGroupName 'ResourceGroup01' -SourcePath 'C:\DSC\client.ps1'
```

## PARAMETERS

### -AutomationAccountName
Expand Down
11 changes: 10 additions & 1 deletion src/Automation/Automation/help/Import-AzAutomationRunbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For wps_2 Workflow runbooks, the script must contain a single wps_2 Workflow def
## EXAMPLES

### Example 1: Import a runbook from a file
```
```powershell
PS C:\> $Tags = @{"tag01"="value01"; "tag02"="value02"}
PS C:\> Import-AzAutomationRunbook -Path .\GraphicalRunbook06.graphrunbook -Tags $Tags -ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Type GraphicalPowershell
```
Expand All @@ -38,6 +38,15 @@ The first command assigns two key/value pairs to the $Tags variable.
The second command imports a graphical runbook called GraphicalRunbook06 into the Automation account named AutomationAccount01.
The command also assigns the tags stored in $Tags.

### Example 2

Imports an Automation runbook. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Import-AzAutomationRunbook -AutomationAccountName 'AutomationAccount01' -Name 'Configuration01' -Path .\GraphicalRunbook06.graphrunbook -Published -ResourceGroupName 'ResourceGroup01' -Type PowerShell
```

## PARAMETERS

### -AutomationAccountName
Expand Down
11 changes: 10 additions & 1 deletion src/Automation/Automation/help/New-AzAutomationAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,21 @@ of other Automation accounts. Automation resources include runbooks, Desired Sta
## EXAMPLES

### Example 1: Create an automation account
```
```powershell
PS C:\> New-AzAutomationAccount -Name "ContosoAutomationAccount" -Location "East US" -ResourceGroupName "ResourceGroup01"
```

This command creates a new automation account named ContosoAutomationAccount in the East US region.

### Example 2

Creates an Automation account. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
New-AzAutomationAccount -Location 'East US' -Name 'ContosoAutomationAccount' -ResourceGroupName 'ResourceGroup01' -Tags <IDictionary>
```

## PARAMETERS

### -DefaultProfile
Expand Down
11 changes: 10 additions & 1 deletion src/Automation/Automation/help/New-AzAutomationRunbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,21 @@ Specify a name for the runbook.
## EXAMPLES

### Example 1: Create a runbook
```
```powershell
PS C:\>New-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" -ResourceGroupName "ResourceGroup01"
```

This command creates a runbook named Runbook02 in the Azure Automation account named Contoso17.

### Example 2

Creates an Automation runbook. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
New-AzAutomationRunbook -AutomationAccountName 'Contoso17' -Name 'Runbook02' -ResourceGroupName 'ResourceGroup01' -Type PowerShell
```

## PARAMETERS

### -AutomationAccountName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@ The runbook starts based on the schedule you specify using the *ScheduleName* pa
## EXAMPLES

### Example 1: Associate a runbook with a schedule
```
```powershell
PS C:\>Register-AzAutomationScheduledRunbook -AutomationAccountName "Contoso17" -Name "Runbk01" -ScheduleName "Sched01" -ResourceGroupName "ResourceGroup01"
```

This command associates the runbook named Runbk01 with the schedule named Sched01 in the Azure Automation account named Contoso17.

### Example 2

Associates a runbook to a schedule. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Register-AzAutomationScheduledRunbook -AutomationAccountName 'Contoso17' -Parameters <IDictionary> -ResourceGroupName 'ResourceGroup01' -RunbookName 'Runbk01' -ScheduleName 'Sched01'
```

## PARAMETERS

### -AutomationAccountName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ The **Remove-AzAutomationDscConfiguration** cmdlet removes APS Desired State Con

## EXAMPLES

### Example 1

Removes DSC configurations from Automation. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Remove-AzAutomationDscConfiguration -AutomationAccountName 'AutomationAccount01' -Name 'Configuration01' -ResourceGroupName myresourcegroup
```

## PARAMETERS

### -AutomationAccountName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ Automation stores DSC node configuration as a Managed Object Format (MOF) config

## EXAMPLES

### Example 1

Removes metadata from DSC node configurations in Automation. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Remove-AzAutomationDscNodeConfiguration -AutomationAccountName 'AutomationAccount01' -IgnoreNodeMappings -Name 'Configuration01' -ResourceGroupName myresourcegroup
```

## PARAMETERS

### -AutomationAccountName
Expand Down
11 changes: 10 additions & 1 deletion src/Automation/Automation/help/Set-AzAutomationWebhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ The **Set-AzAutomationWebhook** cmdlet modifies a webhook for an Azure Automatio
## EXAMPLES

### Example 1: Disable a webhook
```
```powershell
PS C:\>Set-AzAutomationWebhook -Name "Webhook01" -ResourceGroup "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -IsEnabled $False
```

This command disables a webhook named Webhook01 in the Automation account named AutomationAccount01.

### Example 2

Modifies a webhook for an Automation runbook. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Set-AzAutomationWebhook -AutomationAccountName 'AutomationAccount01' -IsEnabled $false -Name 'Webhook01' -Parameters <IDictionary> -ResourceGroupName 'ResourceGroup01'
```

## PARAMETERS

### -AutomationAccountName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl
VSTSNative VsoTfvc /MyRunbooks False False https://contoso.visualstudio.com/_git/Fin...
```

### Example 2

Updates an Azure Automation source control. (autogenerated)

<!-- Aladdin Generated Example -->
```powershell
Update-AzAutomationSourceControl -AccessToken <SecureString> -AutomationAccountName 'devAccount' -Name 'VSTSNative' -ResourceGroupName 'rg1'
```

## PARAMETERS

### -AccessToken
Expand Down

0 comments on commit 6daf098

Please sign in to comment.