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
⚠️ windows_tools
⚠️ missing_linux_example
⚠️ windows_first
Summary:
The documentation page demonstrates a strong Windows and PowerShell bias. All migration instructions, examples, and scripts are provided exclusively in PowerShell, with no mention or examples for Bash, Azure CLI, or Linux-native tooling. The prerequisites and guidance assume the use of PowerShell modules and cmdlets, and there is no discussion of how to perform the migration from a Linux or cross-platform environment. The PowerShell Gallery and Windows-centric patterns (e.g., .ps1 scripts, NuGet package extraction, use of ConvertTo-SecureString, etc.) are referenced throughout, with no alternatives for Linux users.
Recommendations:
  • Provide equivalent Azure CLI (az) commands and scripts for all major steps, including authentication, resource discovery, and migration.
  • Include Bash shell examples for script execution and parameter handling, especially for certificate management and file operations.
  • Reference the Azure Cloud Shell as a cross-platform, browser-based alternative, and clarify that it supports both PowerShell and Bash/CLI.
  • Document how Linux and macOS users can run the migration (e.g., using Azure CLI, Python scripts, or PowerShell Core on Linux), and note any prerequisites or differences.
  • If the migration script is only available in PowerShell, explicitly state this limitation and provide guidance for installing PowerShell Core on Linux/macOS, or offer a roadmap for CLI support.
  • Reorder or balance examples so that Linux/CLI alternatives are presented alongside or before Windows/PowerShell examples where possible.
GitHub Create pull request

Scan History

Date Scan ID Status Bias Status
2025-07-12 23:44 #41 in_progress ❌ Biased
2025-07-12 00:58 #8 cancelled ✅ Clean
2025-07-10 05:06 #7 processing ✅ Clean
2025-07-09 23:22 #6 cancelled ✅ Clean

Flagged Code Snippets

<#PSScriptInfo .VERSION 1.0.10 .GUID be3b84b4-e9c5-46fb-a050-699c68e16119 .AUTHOR Microsoft Corporation .COMPANYNAME Microsoft Corporation .COPYRIGHT Microsoft Corporation. All rights reserved.
Set-AzContext -Subscription '<V1 application gateway SubscriptionId>'
AzureAppGWMigration.ps1 -resourceId <V1 application gateway Resource ID> -subnetAddressRange <subnet space you want to use> -appgwName <string to use to append> -AppGWResourceGroupName <resource group name you want to use> -sslCertificates <comma-separated SSLCert objects as above> -trustedRootCertificates <comma-separated Trusted Root Cert objects as above> -privateIpAddress <private IP string> -publicIpResourceId <public IP name string> -validateMigration -enableAutoScale
$appgw = Get-AzApplicationGateway -Name <V1 gateway name> -ResourceGroupName <resource group Name> $appgw.Id
//Convert the downloaded certificate to SSL object $password = ConvertTo-SecureString <password> -AsPlainText -Force $cert = New-AzApplicationGatewaySSLCertificate -Name <certname> -CertificateFile <Cert-File-Path-1> -Password $password
$password = ConvertTo-SecureString <cert-password> -AsPlainText -Force $mySslCert1 = New-AzApplicationGatewaySslCertificate -Name "Cert01" ` -CertificateFile <Cert-File-Path-1> ` -Password $password $mySslCert2 = New-AzApplicationGatewaySslCertificate -Name "Cert02" ` -CertificateFile <Cert-File-Path-2> ` -Password $password
$vaultName = ConvertTo-SecureString <kv-name> -AsPlainText -Force $certificateName = ConvertTo-SecureString <cert-name> -AsPlainText -Force $password = ConvertTo-SecureString <password> -AsPlainText -Force $pfxSecret = Get-AzKeyVaultSecret -VaultName $vaultName -Name $certificateName -AsPlainText $secretByte = [Convert]::FromBase64String($pfxSecret) $x509Cert = New-Object Security.Cryptography.X509Certificates.X509Certificate2 $x509Cert.Import($secretByte, $null, [Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) $pfxFileByte = $x509Cert.Export([Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $password) # Write to a file [IO.File]::WriteAllBytes("KeyVaultcertificate.pfx", $pfxFileByte)
$certFilePath = ".\rootCA.cer" $trustedCert = New-AzApplicationGatewayTrustedRootCertificate -Name "trustedCert1" -CertificateFile $certFilePath
AzureAppGWMigration.ps1 ` -resourceId /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/MyResourceGroup/providers/Microsoft.Network/applicationGateways/myv1appgateway ` -subnetAddressRange 10.0.0.0/24 ` -appgwname "MynewV2gw" ` -AppGWResourceGroupName "MyResourceGroup" ` -sslCertificates $mySslCert1,$mySslCert2 ` -trustedRootCertificates $trustedCert ` -privateIpAddress "10.0.0.1" ` -publicIpResourceId "/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MyPublicIP" ` -validateMigration -enableAutoScale