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
windows_first
windows_tools
Summary
The documentation shows a moderate Windows bias: PowerShell (a Windows-centric tool) is presented first in all sections, and its usage is described in greater detail. In the Azure CLI section, both Bash (Linux) and Windows command syntaxes are provided, but Windows batch syntax is given equal prominence, and 'REM' (a Windows batch comment) is used in the CLI example. There are no Linux-specific tools or shell scripting examples beyond Bash variable assignment, and the PowerShell section is more detailed and prominent.
Recommendations
  • Alternate the order of PowerShell and Azure CLI sections, or present Azure CLI (which is more cross-platform) first.
  • Provide more detailed Bash/Linux shell scripting examples, including error handling and output, to match the PowerShell example's depth.
  • Use cross-platform comment syntax in CLI examples (e.g., '#' for Bash, 'REM' for Windows), and clearly separate Bash and Windows batch examples.
  • Highlight that Azure CLI is fully cross-platform and can be used in Linux, macOS, and Windows environments.
  • Consider adding Linux-native automation examples (e.g., using shell scripts or cron jobs) for starting/stopping VMs.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-14 00:00 #250 in_progress Biased Biased
2026-01-13 00:00 #246 completed Biased Biased
2026-01-11 00:00 #240 completed Biased Biased
2026-01-10 00:00 #237 completed Biased Biased
2026-01-09 00:34 #234 completed Biased Biased
2026-01-08 00:53 #231 completed Biased Biased
2026-01-06 18:15 #225 cancelled Clean Clean
2025-08-17 00:01 #83 cancelled Clean Clean
2025-07-13 21:37 #48 completed Biased Biased
2025-07-09 13:09 #3 cancelled Clean Clean
2025-07-08 04:23 #2 cancelled Biased Biased

Flagged Code Snippets

    $sub = Get-AzSubscription -ErrorAction SilentlyContinue
    if(-not($sub))
    {
        Connect-AzAccount
    }
    
    # Set-AzContext -SubscriptionId "<Subscription ID>"
    
    $devTestLabName = "<lab name>"
    $vMToStart = "<VM name>"
    $vmAction = "<Start or Stop>"
    
   az login
   
   REM az account set --subscription <SubscriptionId>
   
    # Get the lab information
    $devTestLab = Get-AzResource -ResourceType 'Microsoft.DevTestLab/labs' -ResourceName $devTestLabName
    
    # Start or stop the VM and return a succeeded or failed status
    $returnStatus = Invoke-AzResourceAction `
                        -ResourceId "$($devTestLab.ResourceId)/virtualmachines/$vMToStart" `
                        -Action $vmAction `
                        -Force
    
    if ($returnStatus.Status -eq 'Succeeded') {
        Write-Output "##[section] Successfully updated DTL machine: $vMToStart, Action: $vmAction"
    }
    else {
        Write-Error "##[error] Failed to update DTL machine: $vMToStart, Action: $vmAction"
    }
    
   set SUBSCRIPTIONID=<SubscriptionId>
   set RESOURCEGROUP=<resourceGroup>
   set DEVTESTLABNAME=<lab name>
   set VMNAME=<VM name>
   set ACTION=<Start or Stop>