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_first
Summary
The documentation demonstrates a moderate Windows bias by prioritizing PowerShell examples and instructions before CLI (Bash) and REST alternatives. PowerShell is a Windows-centric tool, and its prominence may disadvantage Linux or cross-platform users. However, the inclusion of Azure CLI (Bash) and REST API examples does provide Linux parity, though these are consistently presented after PowerShell, reinforcing a 'Windows-first' pattern.
Recommendations
  • Present Azure CLI (Bash) examples before or alongside PowerShell examples to better serve Linux and cross-platform users.
  • Explicitly state that Azure CLI commands are cross-platform and can be used on Windows, Linux, and macOS.
  • Where possible, provide examples in a neutral scripting language (such as Bash or Python) or clarify that PowerShell Core is available cross-platform.
  • Review and balance the order of example tabs so that no single OS is consistently prioritized.
  • Add a brief section or note highlighting tool availability and parity across platforms.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-02-19 00:00 #398 in_progress Clean Clean
2026-02-18 00:00 #394 in_progress Clean Clean
2026-02-17 00:00 #390 in_progress Clean Clean
2026-02-16 00:00 #386 in_progress Clean Clean
2026-02-15 00:00 #382 in_progress Clean Clean
2026-02-14 00:00 #378 in_progress Clean Clean
2026-02-13 00:00 #374 in_progress Biased Biased
2026-02-12 00:00 #370 in_progress Biased Biased
2026-02-11 00:00 #366 in_progress Clean Clean
2026-02-10 00:00 #362 completed Biased Biased
2026-02-09 00:00 #358 completed Biased Biased
2026-02-08 00:00 #354 completed Clean Clean
2026-02-05 00:00 #342 completed Clean Clean
2026-02-04 00:00 #338 completed Clean Clean
2026-02-03 00:00 #334 completed Clean Clean
2026-02-02 00:00 #330 completed Clean Clean
2026-02-01 00:00 #326 completed Clean Clean
2026-01-31 00:00 #322 completed Clean Clean
2026-01-30 00:00 #318 completed Clean Clean
2026-01-27 00:00 #306 completed Clean Clean
2026-01-26 00:00 #302 completed Clean Clean
2026-01-24 00:00 #294 completed Clean Clean
2026-01-23 00:00 #290 failed Biased Biased
2026-01-14 00:00 #250 in_progress Biased Biased
2026-01-13 00:00 #246 completed Biased Biased
2026-01-12 00:00 #243 cancelled Biased Biased
2026-01-11 00:00 #240 completed Biased Biased
2026-01-10 00:00 #237 completed Biased Biased
2026-01-09 00:34 #234 completed Biased Biased
2026-01-08 00:53 #231 completed Clean Clean
2026-01-08 00:00 #228 cancelled Clean Clean
2026-01-06 18:15 #225 cancelled Clean Clean
2025-09-14 00:00 #111 completed Biased Biased
2025-08-14 00:01 #80 cancelled Biased Biased
2025-07-13 21:25 #47 cancelled Biased Biased
2025-07-13 20:48 #44 cancelled Biased Biased
2025-07-09 13:09 #3 cancelled Clean Clean
2025-07-08 04:23 #2 cancelled Biased Biased

Flagged Code Snippets

$apiManagementName="myapim";
$apiManagementResourceGroup="apimresourcegroup";
$storageAccountName="backupstorageaccount";
$storageResourceGroup="storageresourcegroup";
$containerName="backups";
$blobName="ContosoBackup.apimbackup"
$storageKey = (Get-AzStorageAccountKey -ResourceGroupName $storageResourceGroup -StorageAccountName $storageAccountName)[0].Value

$storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageKey

Backup-AzApiManagement -ResourceGroupName $apiManagementResourceGroup -Name $apiManagementName `
    -StorageContext $storageContext -TargetContainerName $containerName -TargetBlobName $blobName
$storageContext = New-AzStorageContext -StorageAccountName $storageAccountName

Backup-AzApiManagement -ResourceGroupName $apiManagementResourceGroup -Name $apiManagementName `
    -StorageContext $storageContext -TargetContainerName $containerName `
    -TargetBlobName $blobName -AccessType "SystemAssignedManagedIdentity"
$identityName = "myidentity";
$identityResourceGroup = "identityresourcegroup";

$identityId = (Get-AzUserAssignedIdentity -Name $identityName -ResourceGroupName $identityResourceGroup).ClientId

$storageContext = New-AzStorageContext -StorageAccountName $storageAccountName

Backup-AzApiManagement -ResourceGroupName $apiManagementResourceGroup -Name $apiManagementName `
    -StorageContext $storageContext -TargetContainerName $containerName `
    -TargetBlobName $blobName -AccessType "UserAssignedManagedIdentity" ` -identityClientId $identityid

Set the value of the `Content-Type` request header to `application/json`.

Backup is a long-running operation that may take several minutes to complete. If the request succeeded and the backup process began, you receive a `202 Accepted` response status code with a `Location` header. Make `GET` requests to the URL in the `Location` header to find out the status of the operation. While the backup is in progress, you continue to receive a `202 Accepted` status code. During this time the API gateway continues to handle requests, but the state of the service is Updating. A Response code of `200 OK` indicates successful completion of the backup operation. 

---

## Restore an API Management service

> [!CAUTION]
> Avoid changes to the service configuration (for example, APIs, policies, developer portal appearance) while restore operation is in progress. Changes **could be overwritten**.

### [PowerShell](#tab/powershell)

In the following examples, 

* An API Management instance named *myapim* is restored from the backup blob named *ContosoBackup.apimbackup* in storage account *backupstorageaccount*.
* The backup blob is in a container named *backups*.

Set variables in PowerShell: