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_tools
windows_first
Summary
The documentation provides both Bash and PowerShell examples throughout, but the PowerShell examples rely heavily on the Az PowerShell module, which is primarily a Windows/PowerShell-centric tool. In several cases, the PowerShell examples are more verbose and use Windows-specific patterns (e.g., object pipelines, hash tables), and the documentation includes instructions to install PowerShell modules. The Azure CLI (Bash) examples are more concise and cross-platform, but PowerShell is given equal prominence, which may suggest a Windows-centric approach. There is no mention of native Linux tools or shell scripting beyond Bash, and PowerShell is presented as the only alternative to Bash, with no mention of other Unix shells.
Recommendations
  • Clarify that PowerShell Core is cross-platform, or explicitly mention that PowerShell examples work on Linux/macOS if PowerShell Core is used.
  • Consider adding examples using other common Linux shells (e.g., zsh, sh) or note that Bash examples are compatible with them.
  • Where possible, simplify PowerShell examples to reduce Windows-specific patterns and make them more approachable for non-Windows users.
  • Add a brief note at the start explaining that Azure CLI is the recommended cross-platform tool, and PowerShell is provided for users who prefer it.
  • Ensure that any instructions for installing tools (like Az PowerShell modules) include cross-platform guidance.
  • If possible, provide a table or toggle to let users select their preferred environment (Windows, Linux, macOS) and show only relevant examples.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-12 00:00 #99 completed Clean Clean
2026-01-11 06:20 #98 completed Clean Clean
2026-01-10 00:00 #92 completed Clean Clean
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean

Flagged Code Snippets

	New-AzKeyVault -Name "$KeyVaultName" -ResourceGroupName "$ResourceGroupName" -Location "$Location"
	
	$ContainerAppName = "my-container-app"
	$KeyVaultName = "my-key-vault"
	$UserPrincipalName = "<USER_PRINCIPAL_NAME>"
	$SecretName = "my-secret-name"
	$ContainerImageName = "<CONTAINER_IMAGE_NAME>"
	$RegistryServer = "<REGISTRY_SERVER>"
	$RegistryUsername = "<REGISTRY_USERNAME>"
	
	Install-Module Az.KeyVault -Repository PSGallery -Force
	
	$KeyVault=Get-AzKeyVault -VaultName $KeyVaultName
	New-AzRoleAssignment -SignInName "$UserPrincipalName" -RoleDefinitionName "Key Vault Secrets Officer" -Scope $KeyVault.ResourceID
	
	$Secret = ConvertTo-SecureString -String "<REGISTRY_PASSWORD>" -AsPlainText -Force
	Set-AzKeyVaultSecret -VaultName "$KeyVaultName" -Name "$SecretName" -SecretValue "$Secret"
	
	$RegistryPassword = Get-AzKeyVaultSecret -VaultName "$KeyVaultName" -Name "$SecretName" -AsPlainText
	
	$EnvId = (Get-AzContainerAppManagedEnv -ResourceGroupName $ResourceGroupName -EnvName $ContainerAppsEnvironment).Id
	
	$TemplateObj = New-AzContainerAppTemplateObject -Name $ContainerAppName -Image $ContainerImageName
	
	$RegistrySecretObj = New-AzContainerAppSecretObject -Name $SecretName -Value $RegistryPassword
	
	$RegistryArgs = @{
		PasswordSecretRef = $SecretName
		Server = $RegistryServer
		Username = $RegistryUsername
	}
	
	$RegistryObj = New-AzContainerAppRegistryCredentialObject @RegistryArgs
	
	$ContainerAppArgs = @{
		Name = $ContainerAppName
		Location = $Location
		ResourceGroupName = $ResourceGroupName
		ManagedEnvironmentId = $EnvId
		TemplateContainer = $TemplateObj
		ConfigurationRegistry = $RegistryObj
		ConfigurationSecret = $RegistrySecretObj
	}
	
	New-AzContainerApp @ContainerAppArgs
	
	$ContainerAppName = "my-container-app"
	$ContainerImageName = "mcr.microsoft.com/k8se/quickstart:latest"
	
	$TemplateObj = New-AzContainerAppTemplateObject -Name $ContainerAppName  -Image $ContainerImageName
	
	$EnvId = (Get-AzContainerAppManagedEnv -ResourceGroupName $ResourceGroupName -EnvName $ContainerAppsEnvironment).Id
	
	$ContainerAppArgs = @{
		Name = $ContainerAppName
		Location = $Location
		ResourceGroupName = $ResourceGroupName
		ManagedEnvironmentId = $EnvId
		TemplateContainer = $TemplateObj
	}
	
	New-AzContainerApp @ContainerAppArgs
	
$queryResults = Invoke-AzOperationalInsightsQuery -WorkspaceId $WorkspaceId -Query "ContainerAppConsoleLogs_CL | where ContainerAppName_s == $ContainerAppName | project ContainerAppName_s, Log_s, TimeGenerated"
$queryResults.Results
Remove-AzResourceGroup -Name $ResourceGroupName -Force