Skip to content

Commit f6b3968

Browse files
{Automation} Fix #20408: Fix start-AzAutomationRunbook passing python … (#20427)
* {Automation} Fix #20408: Fix tart-AzAutomationRunbook passing python parameters out of order and breaks script Fixes #20408 * Update Start-AzAutomationRunbook.md * Update ChangeLog.md * Update ChangeLog.md Co-authored-by: Jin Lei <[email protected]>
1 parent 9d326e0 commit f6b3968

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Automation/Automation/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Updated Example: Start-AzAutomationRunbook should pass ordered dictionary for parameters [#20408]
2122

2223
## Version 1.8.0
2324
* Added cmdlets for Hybrid Runbook Worker group management

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ This command starts a runbook job for the runbook named Runbk01 in the Azure Aut
4242

4343
### Example 2: Start a Python 2 runbook job with parameters
4444
```powershell
45-
Start-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "RunbkPy01" -ResourceGroupName "ResourceGroup01" -Parameters @{"Key1"="ValueForPosition1";"Key2"="ValueForPosition2"}
45+
$params = [ordered]@{"Key1"="ValueForPosition1";"Key2"="ValueForPosition2"}
46+
Start-AzAutomationRunbook -AutomationAccountName "Contoso17" -Name "RunbkPy01" -ResourceGroupName "ResourceGroup01" -Parameters $params
4647
```
4748

4849
This command starts a runbook job for the Python 2 runbook named RunbkPy01 in the Azure Automation account named Contoso17 with "ValueForPosition1" as the first positional parameter and "ValueForPosition2" for the second one.

0 commit comments

Comments
 (0)