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
⚠️ missing_linux_example
⚠️ windows_tools
Summary:
The documentation provides only a PowerShell script for automating VM deletion, with no equivalent Bash, Azure CLI, or Linux-friendly example. The automation section is Windows/PowerShell-centric, and there is no mention of cross-platform tools or alternatives for Linux/macOS users.
Recommendations:
  • Add an Azure CLI (az) example for deleting all VMs in a lab, as Azure CLI is cross-platform and commonly used on Linux/macOS.
  • Include Bash script examples or instructions for Linux users where automation is discussed.
  • Explicitly mention that PowerShell Core is cross-platform if recommending PowerShell, and provide installation guidance for non-Windows systems.
  • Ensure that any automation or scripting guidance is presented with parity for both Windows and Linux users, ideally showing both PowerShell and CLI/Bash alternatives side by side.
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 ❌ Biased
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

# Delete all the VMs in a lab. # Values to change: $subscriptionId = "<Enter Azure subscription ID here>" $labResourceGroup = "<Enter lab's resource group here>" $labName = "<Enter lab name here>" # Sign in to your Azure account. Connect-AzAccount # Select the Azure subscription that has the lab. This step is optional # if you have only one subscription. Select-AzSubscription -SubscriptionId $subscriptionId # Get the lab that has the VMs that you want to delete. $lab = Get-AzResource -ResourceId ('subscriptions/' + $subscriptionId + '/resourceGroups/' + $labResourceGroup + '/providers/Microsoft.DevTestLab/labs/' + $labName) # Get the VMs from that lab. $labVMs = Get-AzResource | Where-Object { $_.ResourceType -eq 'microsoft.devtestlab/labs/virtualmachines' -and $_.Name -like "$($lab.Name)/*"} # Delete the VMs. foreach($labVM in $labVMs) { Remove-AzResource -ResourceId $labVM.ResourceId -Force }