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_tools
⚠️
missing_linux_example
⚠️
windows_first
Summary:
The documentation exclusively uses PowerShell cmdlets and Windows-centric tools (e.g., Az PowerShell, Invoke-Sqlcmd, Hybrid Runbook Worker setup via PowerShell) for all examples and instructions. There are no references to Linux-based automation, Bash, Azure CLI, or cross-platform scripting. The guidance and code samples assume a Windows environment, with no mention of Linux equivalents or how to achieve the same tasks on non-Windows platforms.
Recommendations:
- Add equivalent examples using Azure CLI and Bash scripts for connecting and managing Azure SQL Database, alongside PowerShell examples.
- Explicitly mention that Azure Automation supports Python and Bash runbooks, and provide sample code for those environments.
- Document how to install and use required modules/tools on Linux-based Hybrid Runbook Workers, not just via PowerShell.
- Include notes or sections on differences and considerations for Linux-based automation, such as authentication, environment variables, and module installation.
- Reorder or parallelize examples so that Linux and cross-platform approaches are presented alongside Windows/PowerShell methods, rather than only after or not at all.
Create pull request
Flagged Code Snippets
# AutomationAccount - replace with your Automation account's name
# ObjectID - replace with object (principal) ID for your system managed identity principal from step 1.
CREATE USER "AutomationAccount" FROM EXTERNAL PROVIDER WITH OBJECT_ID = `ObjectID`
EXEC sp_addrolemember `db_owner`, "AutomationAccount"
if ($($env:computerName) -eq "Client") {"Runbook running on Azure Client sandbox"} else {"Runbook running on " + $env:computerName}
Disable-AzContextAutosave -Scope Process
Connect-AzAccount -Identity
$Token = (Get-AZAccessToken -ResourceUrl https://database.windows.net).Token
Invoke-Sqlcmd -ServerInstance azuresqlserverxyz.database.windows.net -Database MyDBxyz -AccessToken $token -query 'select * from TableXYZ'