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 is heavily focused on PowerShell and Windows-centric tooling, with detailed examples, screenshots, and step-by-step guides for PowerShell and graphical (PowerShell-based) runbooks. Linux-native workflows, tools, or shell examples are absent. Python runbooks are mentioned but only briefly, with no parity in example depth or workflow coverage. There are no Bash, CLI, or Linux-specific examples or guidance, and all automation examples use Windows/PowerShell conventions and tools.
Recommendations:
- Add equivalent examples for starting and managing runbooks using Azure CLI (az) commands, which are cross-platform and commonly used on Linux.
- Provide Bash shell examples for passing parameters to runbooks, including how to invoke runbooks and handle JSON input from Linux environments.
- Expand the Python runbook section to include detailed parameter handling, input examples, and end-to-end workflows similar to the PowerShell sections.
- Include notes or sections on how Linux users can authenticate, manage files, and interact with Azure Automation from non-Windows environments.
- Balance screenshots and walkthroughs to include Linux terminal/CLI usage, not just PowerShell and graphical editors.
- Mention and link to documentation for Linux tools and workflows wherever Windows/PowerShell tools are referenced.
Create pull request
Flagged Code Snippets
$json = (Get-content -path 'JsonPath\test.json' -Raw) | Out-string
$job = Start-AzAutomationRunbook @RBParams
Param
(
[Parameter (Mandatory= $true/$false)]
[Type] $Name1 = <Default value>,
[Parameter (Mandatory= $true/$false)]
[Type] $Name2 = <Default value>
)
[Parameter (Mandatory = $true)]
[object] $FullName
@{"FirstName"="Joe";"MiddleName"="Bob";"LastName"="Smith"}
$params = @{"VMName"="WSVMClassic";"resourceGroupeName"="WSVMClassicSG"}
Start-AzAutomationRunbook -AutomationAccountName "TestAutomation" -Name "Get-AzureVMGraphical" –ResourceGroupName $resourceGroupName -Parameters $params
$params = @{"VMName"="WSVMClassic"; "ServiceName"="WSVMClassicSG"}
Start-AzureAutomationRunbook -AutomationAccountName "TestAutomation" -Name "Get-AzureVMGraphical" -Parameters $params
IDictionary<string, string> RunbookParameters = new Dictionary<string, string>();
// Add parameters to the dictionary.
RunbookParameters.Add("VMName", "WSVMClassic");
RunbookParameters.Add("resourceGroupName", "WSSC1");
//Call the StartRunbook method with parameters
StartRunbook("Get-AzureVMGraphical", RunbookParameters);
{
"properties":{
"runbook":{
"name":"Get-AzureVMTextual"},
"parameters":{
"VMName":"WindowsVM",
"resourceGroupName":"ContosoSales"}
}
}
Param(
[parameter(Mandatory=$true)]
[object]$json
)
# Ensures you do not inherit an AzContext in your runbook
Disable-AzContextAutosave -Scope Process
# Connect to Azure with system-assigned managed identity
$AzureContext = (Connect-AzAccount -Identity).context
# set and store context
$AzureContext = Set-AzContext -SubscriptionName $AzureContext.Subscription -DefaultProfile $AzureContext
# Convert object to actual JSON
$json = $json | ConvertFrom-Json
# Use the values from the JSON object as the parameters for your command
Start-AzVM -Name $json.VMName -ResourceGroupName $json.ResourceGroup -DefaultProfile $AzureContext
$JsonParams = @{"json"=$json}
$RBParams = @{
AutomationAccountName = 'AATest'
ResourceGroupName = 'RGTest'
Name = 'Test-Json'
Parameters = $JsonParams
}