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:
⚠️ windows_first
⚠️ powershell_heavy
⚠️ windows_tools
Summary:
The documentation demonstrates a moderate Windows bias by consistently presenting Azure PowerShell (a Windows-centric tool) before Azure CLI in all code example tabs. The PowerShell sections are more detailed, with additional context and troubleshooting steps, and the documentation assumes familiarity with PowerShell cmdlets and patterns. There is no explicit mention of Linux or Bash-specific instructions, and the CLI examples, while present, are always listed after PowerShell, reinforcing a Windows-first approach. The documentation also refers to 'PowerShell' generically in some places, which may confuse cross-platform users, as PowerShell Core is available on Linux/macOS but is less commonly used than Bash.
Recommendations:
  • Alternate the order of PowerShell and CLI examples, or present CLI (which is cross-platform) before PowerShell to avoid reinforcing a Windows-first workflow.
  • Explicitly mention that Azure CLI commands work natively on Linux, macOS, and Windows, and clarify that PowerShell examples are also compatible with PowerShell Core on non-Windows platforms.
  • Add Bash-specific notes or examples where relevant, especially for scripting scenarios.
  • In prerequisite sections, clarify installation instructions for both Windows and Linux environments for all tools (Azure CLI, PowerShell).
  • Use neutral language such as 'Azure CLI' and 'PowerShell' (with platform notes) rather than assuming a Windows environment.
  • Consider including troubleshooting tips or environment setup notes for Linux users, especially regarding authentication and module installation.
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-12 23:44 #41 in_progress ❌ Biased
2025-07-09 13:09 #3 cancelled ✅ Clean
2025-07-08 04:23 #2 cancelled ❌ Biased

Flagged Code Snippets

## Create public IP prefix for NAT gateway ## $ip = @{ Name = 'public-ip-prefix-nat' ResourceGroupName = 'test-rg' Location = 'eastus2' Sku = 'Standard' PrefixLength ='29' } New-AzPublicIpPrefix @ip
## Place NAT gateway into a variable. ## $ng = @{ Name = 'nat-gateway' ResourceGroupName = 'test-rg' } $nat = Get-AzNatGateway @ng ## Place the existing public IP prefix associated with the NAT gateway into a variable. ## $ip = @{ Name = 'public-ip-prefix-nat' ResourceGroupName = 'test-rg' } $prefixIP1 = Get-AzPublicIPPrefix @ip ## Place the secondary public IP prefix into a variable. ## $ip = @{ Name = 'public-ip-prefix-nat2' ResourceGroupName = 'test-rg' } $prefixIP2 = Get-AzPublicIPprefix @ip ## Place ONLY the prefix you wish to keep in the array. DO NOT ADD THE SECONDARY VARIABLE ## $preArray = $prefixIP1 ## Add the IP address prefix to the NAT gateway. ## $nt = @{ NatGateway = $nat PublicIpPrefix = $preArray } Set-AzNatGateway @nt
## Create public IP address for NAT gateway ## $ip = @{ Name = 'public-ip-nat' ResourceGroupName = 'test-rg' Location = 'eastus2' Sku = 'Standard' AllocationMethod = 'Static' } New-AzPublicIpAddress @ip
## Place the virtual network into a variable. ## $net = @{ Name = 'vnet-1' ResourceGroupName = 'test-rg' } $vnet = Get-AzVirtualNetwork @net ## Place the public IP address you created previously into a variable. ## $pip = @{ Name = 'public-ip-nat' ResourceGroupName = 'test-rg' } $publicIP = Get-AzPublicIPAddress @pip ## Create NAT gateway resource ## $nat = @{ ResourceGroupName = 'test-rg' Name = 'nat-gateway' IdleTimeoutInMinutes = '4' Sku = 'Standard' Location = 'eastus2' PublicIpAddress = $publicIP } $natGateway = New-AzNatGateway @nat ## Create the subnet configuration. ## $sub = @{ Name = 'subnet-1' VirtualNetwork = $vnet NatGateway = $natGateway AddressPrefix = '10.0.0.0/24' } Set-AzVirtualNetworkSubnetConfig @sub ## Save the configuration to the virtual network. ## $vnet | Set-AzVirtualNetwork
## Place the virtual network into a variable. ## $net = @{ Name = 'vnet-1' ResourceGroupName = 'test-rg' } $vnet = Get-AzVirtualNetwork @net ## Place the public IP prefix you created previously into a variable. ## $pip = @{ Name = 'public-ip-prefix-nat' ResourceGroupName = 'test-rg' } $publicIPprefix = Get-AzPublicIPPrefix @pip ## Create NAT gateway resource ## $nat = @{ ResourceGroupName = 'test-rgNAT' Name = 'nat-gateway' IdleTimeoutInMinutes = '4' Sku = 'Standard' Location = 'eastus2' PublicIpPrefix = $publicIPprefix } $natGateway = New-AzNatGateway @nat ## Create the subnet configuration. ## $sub = @{ Name = 'subnet-1' VirtualNetwork = $vnet NatGateway = $natGateway AddressPrefix = '10.0.0.0/24' } Set-AzVirtualNetworkSubnetConfig @sub ## Save the configuration to the virtual network. ## $vnet | Set-AzVirtualNetwork
# Specify the resource group and NAT gateway name $resourceGroupName = "test-rg" # Specify the virtual network name and subnet name $virtualNetworkName = "vnet-1" $subnetName = "subnet-1" # Get the virtual network $vnet = @{ Name = $virtualNetworkName ResourceGroupName = $resourceGroupName } $virtualNetwork = Get-AzVirtualNetwork @vnet # Get the subnet $subnet = $virtualNetwork.Subnets | Where-Object {$_.Name -eq $subnetName} # Remove the NAT gateway association from the subnet $subnet.NatGateway = $null # Update the subnet configuration $subConfig = @{ Name = $subnetName VirtualNetwork = $virtualNetwork AddressPrefix = $subnet.AddressPrefix } Set-AzVirtualNetworkSubnetConfig @subConfig # Update the virtual network Set-AzVirtualNetwork -VirtualNetwork $virtualNetwork
# Specify the resource group and NAT gateway name $resourceGroupName = "test-rg" $natGatewayName = "nat-gateway" $nat = @{ Name = $natGatewayName ResourceGroupName = $resourceGroupName } Remove-AzNatGateway @nat
## Create public IP address for NAT gateway ## $ip = @{ Name = 'public-ip-nat2' ResourceGroupName = 'test-rg' Location = 'eastus2' Sku = 'Standard' AllocationMethod = 'Static' } New-AzPublicIpAddress @ip
## Place NAT gateway into a variable. ## $ng = @{ Name = 'nat-gateway' ResourceGroupName = 'test-rg' } $nat = Get-AzNatGateway @ng ## Place the existing public IP address associated with the NAT gateway into a variable. ## $ip = @{ Name = 'public-ip-nat' ResourceGroupName = 'test-rg' } $publicIP1 = Get-AzPublicIPaddress @ip ## Place the public IP address you created previously into a variable. ## $ip = @{ Name = 'public-ip-nat2' ResourceGroupName = 'test-rg' } $publicIP2 = Get-AzPublicIPaddress @ip ## Place the public IP address variables into an array. ## $pipArray = $publicIP1,$publicIP2 ## Add the IP address to the NAT gateway. ## $nt = @{ NatGateway = $nat PublicIpAddress = $pipArray } Set-AzNatGateway @nt
## Place NAT gateway into a variable. ## $ng = @{ Name = 'nat-gateway' ResourceGroupName = 'test-rg' } $nat = Get-AzNatGateway @ng ## Place the existing public IP address associated with the NAT gateway into a variable. ## $ip = @{ Name = 'public-ip-nat' ResourceGroupName = 'test-rg' } $publicIP1 = Get-AzPublicIPaddress @ip ## Place the second public IP address into a variable. ## $ip = @{ Name = 'public-ip-nat2' ResourceGroupName = 'test-rg' } $publicIP2 = Get-AzPublicIPAddress @ip ## Place ONLY the public IP you wish to keep in the array. ## $pipArray = $publicIP1 ## Add the public IP address to the NAT gateway. ## $nt = @{ NatGateway = $nat PublicIpAddress = $pipArray } Set-AzNatGateway @nt
## Create public IP prefix for NAT gateway ## $ip = @{ Name = 'public-ip-prefix-nat2' ResourceGroupName = 'test-rg' Location = 'eastus2' Sku = 'Standard' PrefixLength = '29' } New-AzPublicIpPrefix @ip
## Place NAT gateway into a variable. ## $ng = @{ Name = 'nat-gateway' ResourceGroupName = 'test-rg' } $nat = Get-AzNatGateway @ng ## Place the existing public IP prefix associated with the NAT gateway into a variable. ## $ip = @{ Name = 'public-ip-prefix-nat' ResourceGroupName = 'test-rg' } $prefixIP1 = Get-AzPublicIPPrefix @ip ## Place the public IP prefix you created previously into a variable. ## $ip = @{ Name = 'public-ip-prefix-nat2' ResourceGroupName = 'test-rg' } $prefixIP2 = Get-AzPublicIPprefix @ip ## Place the public IP address variables into an array. ## $preArray = $prefixIP1,$prefixIP2 ## Add the IP address prefix to the NAT gateway. ## $nt = @{ NatGateway = $nat PublicIpPrefix = $preArray } Set-AzNatGateway @nt