This page contains Windows bias

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 page exclusively uses PowerShell and Azure PowerShell cmdlets for all examples and instructions, with no mention of Linux, Bash, Azure CLI, or cross-platform alternatives. All command-line examples are in PowerShell, and there is an explicit requirement to install Azure PowerShell. No Linux or macOS-specific guidance or parity is provided.
Recommendations:
  • Provide equivalent examples using Azure CLI, which is cross-platform and works on Windows, Linux, and macOS.
  • Include Bash script examples alongside PowerShell, or at least mention that the steps can be performed using Azure CLI on Linux/macOS.
  • Add a section or note clarifying that these tasks can also be accomplished on non-Windows platforms, and link to relevant Azure CLI documentation.
  • Rephrase instructions to avoid assuming the user is on Windows (e.g., avoid 'PS C:\>' prompts or reference to Windows file paths).
  • List both PowerShell and CLI approaches, or provide a table comparing the commands for both environments.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-08-17 00:01 #83 in_progress ✅ Clean
2025-07-13 21:37 #48 completed ✅ Clean
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

PS C:\>New-AzRoleAssignment -ObjectId aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb -RoleDefinitionName "Policy Contributor" -Scope /subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroupName>/providers/Microsoft.DevTestLab/labs/<LabName>/policySets/default/policies/AllowedVmSizesInLab
# List all the operations/actions for a resource provider. Get-AzProviderOperation -OperationSearchString "Microsoft.DevTestLab/*" # List actions in a particular role. (Get-AzRoleDefinition "DevTest Labs User").Actions # Create custom role. $policyRoleDef = (Get-AzRoleDefinition "DevTest Labs User") $policyRoleDef.Id = $null $policyRoleDef.Name = "Policy Contributor" $policyRoleDef.IsCustom = $true $policyRoleDef.AssignableScopes.Clear() $policyRoleDef.AssignableScopes.Add("/subscriptions/<SubscriptionID> ") $policyRoleDef.Actions.Add("Microsoft.DevTestLab/labs/policySets/policies/*") $policyRoleDef = (New-AzRoleDefinition -Role $policyRoleDef)
PS C:\>Get-AzADUser -SearchString "SomeUser" DisplayName Type ObjectId ----------- ---- -------- someuser@hotmail.com aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb
$policyRoleDef = Get-AzRoleDefinition "DevTest Labs User" $policyRoleDef.Actions.Remove('Microsoft.DevTestLab/Environments/*') $policyRoleDef.Id = $null $policyRoleDef.Name = "DevTest Labs Advanced User" $policyRoleDef.IsCustom = $true $policyRoleDef.AssignableScopes.Clear() $policyRoleDef.AssignableScopes.Add("/subscriptions/<subscription Id>") $policyRoleDef.Actions.Add("Microsoft.DevTestLab/labs/virtualMachines/Start/action") $policyRoleDef.Actions.Add("Microsoft.DevTestLab/labs/virtualMachines/Stop/action") $policyRoleDef = New-AzRoleDefinition -Role $policyRoleDef