Sad Tux - Windows bias detected
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

Detected Bias Types
powershell_heavy
missing_linux_example
windows_tools
windows_first
Summary
The documentation provides a PowerShell script as the only CLI-based example for scripting the configuration of resource groups for DevTest Labs VMs. There are no equivalent examples using Bash, Azure CLI in Bash, or other Linux-native tools. The script invocation and syntax are Windows/PowerShell-specific, and there is no mention of Linux or cross-platform alternatives. The documentation implicitly assumes a Windows environment for scripting, which may exclude or inconvenience Linux/macOS users.
Recommendations
  • Add an example using Azure CLI in Bash (sh) syntax to demonstrate how to perform the same operation on Linux/macOS or cross-platform environments.
  • Explicitly mention that the Azure CLI commands can be run in any shell, and provide both PowerShell and Bash variants where applicable.
  • Avoid using only PowerShell-specific script invocation (e.g., .\ResourceGroup.ps1) and include equivalent Bash script invocation (e.g., ./resource-group.sh) if scripts are provided.
  • Where possible, use Azure CLI commands directly in documentation, as they are cross-platform, and supplement with PowerShell only if necessary.
  • Add a note clarifying that the instructions apply to both Windows and Linux users, and provide links to Azure CLI installation and usage guides for Linux/macOS.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2025-07-12 23:44 #41 cancelled Biased Biased
2025-07-12 00:58 #8 cancelled Clean Clean
2025-07-10 05:06 #7 processing Clean Clean

Flagged Code Snippets

[CmdletBinding()]
Param(
    $subId,
    $labRg,
    $labName,
    $vmRg
)

az login | out-null

az account set --subscription $subId | out-null

$rgId = "/subscriptions/"+$subId+"/resourceGroups/"+$vmRg

"Updating lab '$labName' with vm rg '$rgId'..."

az resource update -g $labRg -n $labName --resource-type "Microsoft.DevTestLab/labs" --api-version 2018-10-15-preview --set properties.vmCreationResourceGroupId=$rgId

"Done. New virtual machines will now be created in the resource group '$vmRg'."
.\ResourceGroup.ps1 -subId <subscriptionID> -labRg <labRGNAme> -labName <LanName> -vmRg <RGName>