About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
powershell_heavy
⚠️
windows_first
⚠️
missing_linux_example
⚠️
windows_tools
Summary:
The documentation page demonstrates a clear Windows bias. All command-line examples use Windows PowerShell, and there are no examples for Linux users (e.g., Azure CLI, Bash, or cross-platform PowerShell Core). The term 'Windows PowerShell' is used explicitly, and the documentation does not mention or provide parity for Linux tools or workflows. The order of presentation also places Windows/PowerShell methods before more cross-platform or API-based approaches.
Recommendations:
- Add equivalent Azure CLI examples for starting and managing runbooks, as Azure CLI is cross-platform and widely used on Linux.
- Clarify when 'PowerShell' refers to Windows PowerShell versus cross-platform PowerShell Core, and provide examples that work on both.
- Include Bash/cURL examples for API-based methods to demonstrate Linux-friendly workflows.
- Reorder the methods table or present cross-platform options (like Azure CLI and REST API) before or alongside Windows-specific tools.
- Explicitly mention Linux/macOS compatibility and provide guidance for non-Windows environments.
Create pull request
Flagged Code Snippets
Workflow Test-Parameters
{
param (
[Parameter(Mandatory=$true)][object]$user
)
$userObject = $user | ConvertFrom-JSON
if ($userObject.Show) {
foreach ($i in 1..$userObject.RepeatCount) {
$userObject.FirstName
$userObject.LastName
}
}
}
Workflow Test-Parameters
{
param (
[Parameter(Mandatory=$true)][array]$user
)
if ($user[3]) {
foreach ($i in 1..$user[2]) {
$ user[0]
$ user[1]
}
}
}
Workflow Test-Parameters
{
param (
[Parameter(Mandatory=$true)][PSCredential]$credential
)
$credential.UserName
}
`Start-AzAutomationRunbook` returns a job object that you can use to track status once the runbook is started. You can then use this job object with [Get-AzAutomationJob](/powershell/module/Az.Automation/Get-AzAutomationJob) to determine the status of the job and [Get-AzAutomationJobOutput](/powershell/module/az.automation/get-azautomationjoboutput) to retrieve its output. The following example starts a runbook called **Test-Runbook**, waits until it has completed, and then displays its output.
If the runbook requires parameters, then you must provide them as a [hashtable](/powershell/module/microsoft.powershell.core/about/about_hash_tables). The key of the hashtable must match the parameter name and the value is the parameter value. The following example shows how to start a runbook with two string parameters named FirstName and LastName, an integer named RepeatCount, and a boolean parameter named Show. For more information on parameters, see [Runbook Parameters](#work-with-runbook-parameters).