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 strong Windows/PowerShell bias. All code examples, tool references, and explanations are exclusively based on Windows PowerShell cmdlets and patterns. There are no examples or guidance for Linux-based automation, Bash, or Python runbooks (except for a brief note about Python output language support). Retrieval of runbook output is only shown using Windows PowerShell tools, and preference variables are discussed only in the context of PowerShell. No Linux-native or cross-platform CLI (such as Azure CLI) equivalents are provided.
Recommendations:
- Add equivalent examples using Azure CLI (az) commands for retrieving runbook output and managing jobs, which work cross-platform.
- Include Bash or Python runbook examples where applicable, especially in sections discussing output and message streams.
- When referencing tools or commands, mention cross-platform options (e.g., Azure CLI, REST API) alongside or before Windows PowerShell.
- Clarify which features or behaviors are specific to PowerShell-based runbooks versus those available in Python or other supported runbook types.
- Provide links to documentation for managing Azure Automation from Linux/macOS environments.
- If certain features are only available in PowerShell runbooks, explicitly state this and suggest alternatives for Linux users.
Create pull request
Flagged Code Snippets
Write-Output "This is an output message."
$GLOBAL:DebugPreference="Continue"
Write-Debug "This is a debug message." 5>&1
Write-Output "This is an output message."
Write-Debug "This is a debug message."
$job = Start-AzAutomationRunbook -ResourceGroupName "ResourceGroup01" `
-AutomationAccountName "MyAutomationAccount" -Name "Test-Runbook"
$doLoop = $true
While ($doLoop) {
$job = Get-AzAutomationJob -ResourceGroupName "ResourceGroup01" `
-AutomationAccountName "MyAutomationAccount" -Id $job.JobId
$status = $job.Status
$doLoop = (($status -ne "Completed") -and ($status -ne "Failed") -and ($status -ne "Suspended") -and ($status -ne "Stopped"))
}
Get-AzAutomationJobOutput -ResourceGroupName "ResourceGroup01" `
-AutomationAccountName "MyAutomationAccount" -Id $job.JobId -Stream Output
# For more detailed job output, pipe the output of Get-AzAutomationJobOutput to Get-AzAutomationJobOutputRecord
Get-AzAutomationJobOutput -ResourceGroupName "ResourceGroup01" `
-AutomationAccountName "MyAutomationAccount" -Id $job.JobId -Stream Any | Get-AzAutomationJobOutputRecord