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_first
⚠️ missing_linux_example
⚠️ windows_tools
Summary:
The documentation demonstrates a Windows bias in several ways: PowerShell is frequently used as the primary or sole scripting example for verifying template functions, listing resource providers, VM images, and VM sizes. Windows-specific tools and patterns (such as .ps1 scripts and Windows file paths) are referenced, and examples for Linux or Bash are absent or appear after Windows/PowerShell examples. There are no Linux shell (Bash) equivalents for key operations, and the sample artifact locations and scripts are Windows-centric.
Recommendations:
  • Provide equivalent Bash/Azure CLI examples alongside or before PowerShell examples for all operations, including verifying template functions, listing resource providers, VM images, and VM sizes.
  • Include Linux-based script examples (e.g., .sh files) and artifact locations in addition to Windows (.ps1) scripts.
  • Avoid using Windows-specific terminology or paths exclusively; when referencing scripts or artifacts, show both Windows and Linux variants.
  • When demonstrating VM extensions or custom scripts, include both Windows and Linux extension types and usage.
  • Ensure that any automation or testing tool recommendations (e.g., Visual Studio Code) are presented as cross-platform, and mention alternatives or usage on Linux where applicable.
  • Review all code snippets and ensure parity between PowerShell and Bash/Azure CLI, especially in sections where only PowerShell is currently shown.
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

Flagged Code Snippets

"parameters": { "_artifactsLocation": { "type": "string", "metadata": { "description": "The base URI where artifacts required by this template are located." }, "defaultValue": "https://raw.githubusercontent.com/Microsoft/dotnet-core-sample-templates/master/dotnet-core-music-windows/" }, "_artifactsLocationSasToken": { "type": "securestring", "metadata": { "description": "The sasToken required to access _artifactsLocation." }, "defaultValue": "" } }
You can also use the following PowerShell cmdlet to see available resource providers:
"parameters": { "_artifactsLocation": { "type": "string", "metadata": { "description": "The base URI where artifacts required by this template are located." }, "defaultValue": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.compute/vm-custom-script-windows/" }, "_artifactsLocationSasToken": { "type": "securestring", "metadata": { "description": "The sasToken required to access _artifactsLocation." }, "defaultValue": "" } }
"properties": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.9", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "https://raw.githubusercontent.com/Microsoft/dotnet-core-sample-templates/master/dotnet-core-music-windows/scripts/configure-music-app.ps1" ] } }
"properties": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.9", "autoUpgradeMinorVersion": true, "settings": { "fileUris": [ "[uri(parameters('_artifactsLocation'), concat('scripts/configure-music-app.ps1', parameters('_artifactsLocationSasToken')))]" ] } }
You can also use the following PowerShell cmdlet:
You can retrieve the same list with the Azure PowerShell cmdlet [Get-AzureRmVMImagePublisher](/powershell/module/az.compute/get-azvmimagepublisher) and specify the location you want with the `-Location` parameter. For example:
# Import the module Import-module <path to local clone>\AzTemplateFunctions.psm1 # Execute the Test-AzureRmTemplateFunctions cmdlet Test-AzureRmTemplateFunctions -path <path to local clone>
For Azure PowerShell, use:
You can also execute the Azure PowerShell [Get-AzureRmVmImagePublisher](/powershell/module/az.compute/get-azvmimagepublisher) cmdlet and use `-Location` to specify the location of the virtual machine image. For example:
The API version of the VM extension resource must be present in all the locations you plan to target with your template. The location dependency works like the resource provider API version availability discussed earlier in the "Verify the version of all resource types" section. To retrieve a list of the available API versions for the VM extension resource, use the [Get-AzureRmResourceProvider](/powershell/module/az.resources/get-azresourceprovider) cmdlet with the **Microsoft.Compute** resource provider as shown:
You can also use VM extensions in virtual machine scale sets. The same location conditions apply. To develop your template for cloud consistency, make sure the API versions are available in all the locations you plan on deploying to. To retrieve the API versions of the VM extension resource for scale sets, use the same cmdlet as before, but specify the virtual machine scale sets resource type as shown:
To retrieve a list of the available versions for a specific VM extension, use the [Get-AzureRmVMExtensionImage](/powershell/module/az.compute/get-azvmextensionimage) cmdlet. The following example retrieves the available versions for the PowerShell DSC (Desired State Configuration) VM extension from **myLocation**: