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
Summary:
The documentation page demonstrates a Windows bias by using PowerShell-style variable assignment (e.g., $VAR = ...) and line continuations (`), which are specific to PowerShell and not compatible with Bash or other Linux shells. There are no equivalent Bash/Linux shell examples provided, nor is there any mention of how to adapt the commands for Linux or macOS users. The documentation implicitly assumes a Windows/PowerShell environment throughout.
Recommendations:
- Provide equivalent Bash/Linux shell examples for all commands that use PowerShell syntax, including variable assignment and line continuation.
- Clearly indicate which commands are for PowerShell and which are for Bash, or provide side-by-side examples for both environments.
- Avoid using Windows-specific syntax (such as backtick line continuations and $VAR assignment) in generic Azure CLI documentation, or at least supplement with POSIX-compliant alternatives.
- Add a note at the beginning of the page clarifying which shell environment the examples target, and link to guidance for running Azure CLI on Linux/macOS.
- Test all example commands in both Windows (PowerShell) and Linux (Bash) environments to ensure parity and usability.
Create pull request
Flagged Code Snippets
$SUBID = az account show --name <subscriptionName> --query id -o tsv
Write-Output $SUBID
$OID = az ad sp list --display-name <devcenterName> --query [].id -o tsv
Write-Output $OID
az role assignment create --assignee $OID `
--role "Owner" `
--scope "/subscriptions/$SUBID"
$DEVCID = az devcenter admin devcenter show -n <devcenterName> --query id -o tsv
Write-Output $DEVCID
az devcenter admin project create -n <projectName> `
--description "My first project." `
--dev-center-id $DEVCID
# Remove the group default scope for next the command.
az configure --defaults group=
$ROID = az role definition list -n "Owner" --scope /subscriptions/$SUBID --query [].name -o tsv
Write-Output $ROID
# Set the default resource group again.
az configure --defaults group=<resourceGroupName>
$roles = "{`"$($ROID)`":{}}"
az devcenter admin project-environment-type create `
-n <availableEnvironmentType> `
--project <projectName> `
--identity-type "SystemAssigned" `
--roles $roles `
--deployment-target-id "/subscriptions/$SUBID" `
--status Enabled
$MYOID = az ad signed-in-user show --query id -o tsv
Write-Output $MYOID
az role assignment create --assignee $MYOID `
--role "DevCenter Project Admin" `
--scope "/subscriptions/$SUBID"
az role assignment create --assignee $MYOID `
--role "Deployment Environments User" `
--scope "/subscriptions/$SUBID"