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
Summary:
The documentation presents both Azure PowerShell and Azure CLI examples for network security group configuration, but consistently lists PowerShell (a Windows-centric tool) before CLI. The most detailed, step-by-step example is given in PowerShell, with CLI following. There are no Linux shell (bash) script examples for Azure CLI, and no explicit mention of using CLI on Linux, though CLI is cross-platform. However, the DNS configuration section is Linux-focused, and the 'Test your settings' section recommends using a Linux VM, partially balancing the bias.
Recommendations:
  • Alternate the order of PowerShell and Azure CLI examples, or present CLI first to avoid implicit Windows-first bias.
  • Explicitly state that Azure CLI commands can be run on Linux, macOS, and Windows, and provide bash shell script examples where appropriate.
  • Add a short section or callout for Linux users, highlighting that all CLI steps are fully supported on Linux.
  • Where possible, provide bash script blocks for Azure CLI steps to demonstrate parity and usability for Linux users.
  • Consider including a table or quick reference comparing PowerShell and CLI commands, clarifying platform compatibility.
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

$vnetName = "Replace with your virtual network name" $resourceGroupName = "Replace with the resource group the virtual network is in" $subnetName = "Replace with the name of the subnet that you plan to use for HDInsight" # Get the Virtual Network object $vnet = Get-AzVirtualNetwork ` -Name $vnetName ` -ResourceGroupName $resourceGroupName # Get the region the Virtual network is in. $location = $vnet.Location # Get the subnet object $subnet = $vnet.Subnets | Where-Object Name -eq $subnetName # Create a Network Security Group. # And add exemptions for the HDInsight health and management services. $nsg = New-AzNetworkSecurityGroup ` -Name "hdisecure" ` -ResourceGroupName $resourceGroupName ` -Location $location ` | Add-AzNetworkSecurityRuleConfig ` -name "hdirule1" ` -Description "HDI health and management address 52.164.210.96" ` -Protocol "*" ` -SourcePortRange "*" ` -DestinationPortRange "443" ` -SourceAddressPrefix "52.164.210.96" ` -DestinationAddressPrefix "VirtualNetwork" ` -Access Allow ` -Priority 300 ` -Direction Inbound ` | Add-AzNetworkSecurityRuleConfig ` -Name "hdirule2" ` -Description "HDI health and management 13.74.153.132" ` -Protocol "*" ` -SourcePortRange "*" ` -DestinationPortRange "443" ` -SourceAddressPrefix "13.74.153.132" ` -DestinationAddressPrefix "VirtualNetwork" ` -Access Allow ` -Priority 301 ` -Direction Inbound ` | Add-AzNetworkSecurityRuleConfig ` -Name "hdirule3" ` -Description "HDI health and management 168.61.49.99" ` -Protocol "*" ` -SourcePortRange "*" ` -DestinationPortRange "443" ` -SourceAddressPrefix "168.61.49.99" ` -DestinationAddressPrefix "VirtualNetwork" ` -Access Allow ` -Priority 302 ` -Direction Inbound ` | Add-AzNetworkSecurityRuleConfig ` -Name "hdirule4" ` -Description "HDI health and management 23.99.5.239" ` -Protocol "*" ` -SourcePortRange "*" ` -DestinationPortRange "443" ` -SourceAddressPrefix "23.99.5.239" ` -DestinationAddressPrefix "VirtualNetwork" ` -Access Allow ` -Priority 303 ` -Direction Inbound ` | Add-AzNetworkSecurityRuleConfig ` -Name "hdirule5" ` -Description "HDI health and management 168.61.48.131" ` -Protocol "*" ` -SourcePortRange "*" ` -DestinationPortRange "443" ` -SourceAddressPrefix "168.61.48.131" ` -DestinationAddressPrefix "VirtualNetwork" ` -Access Allow ` -Priority 304 ` -Direction Inbound ` | Add-AzNetworkSecurityRuleConfig ` -Name "hdirule6" ` -Description "HDI health and management 138.91.141.162" ` -Protocol "*" ` -SourcePortRange "*" ` -DestinationPortRange "443" ` -SourceAddressPrefix "138.91.141.162" ` -DestinationAddressPrefix "VirtualNetwork" ` -Access Allow ` -Priority 305 ` -Direction Inbound ` # Set the changes to the security group Set-AzNetworkSecurityGroup -NetworkSecurityGroup $nsg # Apply the NSG to the subnet Set-AzVirtualNetworkSubnetConfig ` -VirtualNetwork $vnet ` -Name $subnetName ` -AddressPrefix $subnet.AddressPrefix ` -NetworkSecurityGroup $nsg $vnet | Set-AzVirtualNetwork
Get-AzNetworkSecurityGroup -Name hdisecure -ResourceGroupName RESOURCEGROUP | Add-AzNetworkSecurityRuleConfig -Name "SSH" -Description "SSH" -Protocol "*" -SourcePortRange "*" -DestinationPortRange "22" -SourceAddressPrefix "*" -DestinationAddressPrefix "VirtualNetwork" -Access Allow -Priority 306 -Direction Inbound
$NICs = Get-AzNetworkInterface -ResourceGroupName "RESOURCEGROUP" $NICs[0].DnsSettings.InternalDomainNameSuffix
$NICs = Get-AzNetworkInterface -ResourceGroupName "RESOURCEGROUP" $NICs[0].DnsSettings.InternalDomainNameSuffix