Skip to content

Commit 6daf098

Browse files
authored
Aladdin generated examples for Automation (#12657)
* Add new examples to Automation - Add new examples to the following modules: Automation * Fix the existing examples.
1 parent b9cdda1 commit 6daf098

10 files changed

+99
-9
lines changed

src/Automation/Automation/help/Get-AzAutomationSourceControlSyncJob.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,23 @@ for the source control VSTSNative.
4545
```powershell
4646
PS C:\> Get-AzAutomationSourceControlSyncJob -ResourceGroupName "rg1" `
4747
-AutomationAccountName "devAccount" `
48-
-Name "VSTSNative"
49-
-Id "08d6d266-27b6-463c-beea-bc48a67ace15"
48+
-Name "VSTSNative" `
49+
-JobId "08d6d266-27b6-463c-beea-bc48a67ace15"
5050
5151
Status SyncType Exception
5252
------ -------- ---------
5353
Failed FullSync There were errors while syncing the user runbooks. Please see error streams for more information. (T...
5454
```
5555

56+
### Example 3
57+
58+
Gets Azure Automation source control sync jobs. (autogenerated)
59+
60+
<!-- Aladdin Generated Example -->
61+
```powershell
62+
Get-AzAutomationSourceControlSyncJob -AutomationAccountName 'devAccount' -JobId 00000000-0000-0000-0000-00000000000000000 -ResourceGroupName 'rg1' -SourceControlName 'VSTSNative'
63+
```
64+
5665
## PARAMETERS
5766

5867
### -AutomationAccountName

src/Automation/Automation/help/Import-AzAutomationDscConfiguration.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,23 @@ Specify the path of an APS script that contains a single DSC configuration.
2626
## EXAMPLES
2727

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

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

37+
### Example 2
38+
39+
Imports a DSC configuration into Automation. (autogenerated)
40+
41+
<!-- Aladdin Generated Example -->
42+
```powershell
43+
Import-AzAutomationDscConfiguration -AutomationAccountName 'Contoso17' -Published -ResourceGroupName 'ResourceGroup01' -SourcePath 'C:\DSC\client.ps1'
44+
```
45+
3746
## PARAMETERS
3847

3948
### -AutomationAccountName

src/Automation/Automation/help/Import-AzAutomationRunbook.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For wps_2 Workflow runbooks, the script must contain a single wps_2 Workflow def
2929
## EXAMPLES
3030

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

41+
### Example 2
42+
43+
Imports an Automation runbook. (autogenerated)
44+
45+
<!-- Aladdin Generated Example -->
46+
```powershell
47+
Import-AzAutomationRunbook -AutomationAccountName 'AutomationAccount01' -Name 'Configuration01' -Path .\GraphicalRunbook06.graphrunbook -Published -ResourceGroupName 'ResourceGroup01' -Type PowerShell
48+
```
49+
4150
## PARAMETERS
4251

4352
### -AutomationAccountName

src/Automation/Automation/help/New-AzAutomationAccount.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,21 @@ of other Automation accounts. Automation resources include runbooks, Desired Sta
2727
## EXAMPLES
2828

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

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

36+
### Example 2
37+
38+
Creates an Automation account. (autogenerated)
39+
40+
<!-- Aladdin Generated Example -->
41+
```powershell
42+
New-AzAutomationAccount -Location 'East US' -Name 'ContosoAutomationAccount' -ResourceGroupName 'ResourceGroup01' -Tags <IDictionary>
43+
```
44+
3645
## PARAMETERS
3746

3847
### -DefaultProfile

src/Automation/Automation/help/New-AzAutomationRunbook.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,21 @@ Specify a name for the runbook.
2626
## EXAMPLES
2727

2828
### Example 1: Create a runbook
29-
```
29+
```powershell
3030
PS C:\>New-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "Runbook02" -ResourceGroupName "ResourceGroup01"
3131
```
3232

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

35+
### Example 2
36+
37+
Creates an Automation runbook. (autogenerated)
38+
39+
<!-- Aladdin Generated Example -->
40+
```powershell
41+
New-AzAutomationRunbook -AutomationAccountName 'Contoso17' -Name 'Runbook02' -ResourceGroupName 'ResourceGroup01' -Type PowerShell
42+
```
43+
3544
## PARAMETERS
3645

3746
### -AutomationAccountName

src/Automation/Automation/help/Register-AzAutomationScheduledRunbook.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,21 @@ The runbook starts based on the schedule you specify using the *ScheduleName* pa
3333
## EXAMPLES
3434

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

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

42+
### Example 2
43+
44+
Associates a runbook to a schedule. (autogenerated)
45+
46+
<!-- Aladdin Generated Example -->
47+
```powershell
48+
Register-AzAutomationScheduledRunbook -AutomationAccountName 'Contoso17' -Parameters <IDictionary> -ResourceGroupName 'ResourceGroup01' -RunbookName 'Runbk01' -ScheduleName 'Sched01'
49+
```
50+
4251
## PARAMETERS
4352

4453
### -AutomationAccountName

src/Automation/Automation/help/Remove-AzAutomationDscConfiguration.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ The **Remove-AzAutomationDscConfiguration** cmdlet removes APS Desired State Con
2424

2525
## EXAMPLES
2626

27+
### Example 1
28+
29+
Removes DSC configurations from Automation. (autogenerated)
30+
31+
<!-- Aladdin Generated Example -->
32+
```powershell
33+
Remove-AzAutomationDscConfiguration -AutomationAccountName 'AutomationAccount01' -Name 'Configuration01' -ResourceGroupName myresourcegroup
34+
```
35+
2736
## PARAMETERS
2837

2938
### -AutomationAccountName

src/Automation/Automation/help/Remove-AzAutomationDscNodeConfiguration.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ Automation stores DSC node configuration as a Managed Object Format (MOF) config
2525

2626
## EXAMPLES
2727

28+
### Example 1
29+
30+
Removes metadata from DSC node configurations in Automation. (autogenerated)
31+
32+
<!-- Aladdin Generated Example -->
33+
```powershell
34+
Remove-AzAutomationDscNodeConfiguration -AutomationAccountName 'AutomationAccount01' -IgnoreNodeMappings -Name 'Configuration01' -ResourceGroupName myresourcegroup
35+
```
36+
2837
## PARAMETERS
2938

3039
### -AutomationAccountName

src/Automation/Automation/help/Set-AzAutomationWebhook.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,21 @@ The **Set-AzAutomationWebhook** cmdlet modifies a webhook for an Azure Automatio
2525
## EXAMPLES
2626

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

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

34+
### Example 2
35+
36+
Modifies a webhook for an Automation runbook. (autogenerated)
37+
38+
<!-- Aladdin Generated Example -->
39+
```powershell
40+
Set-AzAutomationWebhook -AutomationAccountName 'AutomationAccount01' -IsEnabled $false -Name 'Webhook01' -Parameters <IDictionary> -ResourceGroupName 'ResourceGroup01'
41+
```
42+
3443
## PARAMETERS
3544

3645
### -AutomationAccountName

src/Automation/Automation/help/Update-AzAutomationSourceControl.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ Name SourceType Branch FolderPath AutoSync PublishRunbook RepoUrl
3939
VSTSNative VsoTfvc /MyRunbooks False False https://contoso.visualstudio.com/_git/Fin...
4040
```
4141

42+
### Example 2
43+
44+
Updates an Azure Automation source control. (autogenerated)
45+
46+
<!-- Aladdin Generated Example -->
47+
```powershell
48+
Update-AzAutomationSourceControl -AccessToken <SecureString> -AutomationAccountName 'devAccount' -Name 'VSTSNative' -ResourceGroupName 'rg1'
49+
```
50+
4251
## PARAMETERS
4352

4453
### -AccessToken

0 commit comments

Comments
 (0)