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 is heavily biased toward Windows and PowerShell usage. All migration instructions, code samples, and tooling references are exclusively for Azure PowerShell, with no mention of Azure CLI, Bash, or cross-platform scripting. The prerequisites, script download, and execution steps assume a PowerShell environment, and there are no Linux- or macOS-specific instructions or examples. This creates a significant barrier for users on non-Windows platforms or those who prefer CLI/Bash scripting.
Recommendations:
- Provide equivalent Azure CLI (az) commands and scripts for each PowerShell example, including authentication, resource queries, and migration steps.
- Include explicit instructions for running the migration from Linux/macOS environments, such as using Azure Cloud Shell (Bash) or installing PowerShell Core cross-platform.
- Mention and demonstrate how to use the Azure CLI to retrieve resource IDs, manage certificates, and perform other prerequisite steps.
- Clarify whether the migration script can be run in Azure Cloud Shell (Bash) or if it requires PowerShell, and provide alternatives if possible.
- Add a section comparing PowerShell and CLI approaches, helping users choose the best tool for their environment.
- Ensure that any references to downloading and running scripts include Linux/macOS-compatible instructions (e.g., using wget/curl, handling .nupkg files without Windows tools).
Create pull request
Flagged Code Snippets
//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
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
$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
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
<#PSScriptInfo
.VERSION 1.0.10
.GUID be3b84b4-e9c5-46fb-a050-699c68e16119
.AUTHOR Microsoft Corporation
.COMPANYNAME Microsoft Corporation
.COPYRIGHT Microsoft Corporation. All rights reserved.
$certFilePath = ".\rootCA.cer"
$trustedCert = New-AzApplicationGatewayTrustedRootCertificate -Name "trustedCert1" -CertificateFile $certFilePath