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_tools
missing_linux_example
windows_first
Summary
The documentation demonstrates a strong bias towards Windows and PowerShell. All deployment script examples use PowerShell exclusively, with no Bash or cross-platform scripting alternatives. The 'deploymentScripts' resource is shown only with 'AzurePowerShell' kind, and the script content is PowerShell-only. Even in the deployment steps, PowerShell is presented alongside CLI, but the core scripting and troubleshooting are PowerShell-centric. There is no mention or example of using Bash or other Linux-native tools for the deployment script, and PowerShell-specific patterns and escape rules are discussed in detail. This limits accessibility and parity for Linux users.
Recommendations
  • Provide equivalent examples using 'AzureCLI' as the 'kind' for the 'deploymentScripts' resource, with Bash script content.
  • Include Bash script examples for creating and adding certificates to Key Vault, demonstrating cross-platform compatibility.
  • Discuss Bash/Linux-specific troubleshooting steps and file locations in the debugging section.
  • Present CLI/Bash examples before or alongside PowerShell, not after or as an alternative.
  • Clarify in the prerequisites and throughout the tutorial that both PowerShell and Bash/CLI are supported, and link to relevant documentation for both.
  • Add notes about any limitations or differences between PowerShell and Bash deployment scripts in ARM templates.
GitHub Create Pull Request

Scan History

Date Scan Status Result
2026-01-12 00:00 #99 completed Biased Biased
2026-01-11 06:20 #98 completed Biased Biased
2026-01-10 00:00 #92 completed Clean Clean
2026-01-09 00:00 #87 cancelled Clean Clean
2026-01-06 22:28 #78 completed Clean Clean
2025-12-29 18:00 #48 cancelled Biased Biased
2025-12-15 00:00 #7 completed Clean Clean
2025-12-14 05:05 #6 completed Clean Clean

Flagged Code Snippets

    # [PowerShell](#tab/PowerShell)

    
    The `deploymentScripts` resource depends on the key vault resource and the role assignment resource. It has these properties:

    * `identity`: Deployment script uses a user-assigned managed identity to perform the operations in the script.
    * `kind`: Specify the type of script. Currently, only PowerShell scripts are supported.
    * `forceUpdateTag`: Determine whether the deployment script should be executed even if the script source hasn't changed. Can be current time stamp or a GUID. To learn more, see [Run script more than once](./deployment-script-template.md#run-script-more-than-once).
    * `azPowerShellVersion`: Specifies the Azure PowerShell module version to be used. Currently, deployment script supports version 2.7.0, 2.8.0, and 3.0.0.
    * `timeout`: Specify the maximum allowed script execution time specified in the [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601). Default value is **P1D**.
    * `arguments`: Specify the parameter values. The values are separated by spaces.
    * `scriptContent`: Specify the script content. To run an external script, use `primaryScriptURI` instead. For more information, see [Use external script](./deployment-script-template.md#use-external-scripts).
        Declaring `$DeploymentScriptOutputs` is only required when testing the script on a local machine. Declaring the variable allows the script to be run on a local machine and in a `deploymentScript` resource without having to make changes. The value assigned to `$DeploymentScriptOutputs` is available as outputs in the deployments. For more information, see [Work with outputs from PowerShell deployment scripts](./deployment-script-template.md#work-with-outputs-from-powershell-scripts) or [Work with outputs from CLI deployment scripts](./deployment-script-template.md#work-with-outputs-from-cli-scripts).
    * `cleanupPreference`: Specify the preference on when to delete the deployment script resources. The default value is **Always**, which means the deployment script resources are deleted despite the terminal state (Succeeded, Failed, Canceled). In this tutorial, **OnSuccess** is used so that you get a chance to view the script execution results.
    * `retentionInterval`: Specify the interval for which the service retains the script resources after it reaches a terminal state. Resources will be deleted when this duration expires. Duration is based on ISO 8601 pattern. This tutorial uses **P1D**, which means one day. This property is used when `cleanupPreference` is set to **OnExpiration**. This property isn't enabled currently.

    The deployment script takes three parameters: `keyVaultName`, `certificateName`, and `subjectName`. It creates a certificate, and then adds the certificate to the key vault.

    `$DeploymentScriptOutputs` is used to store output value. To learn more, see [Work with outputs from PowerShell deployment scripts](./deployment-script-template.md#work-with-outputs-from-powershell-scripts) or [Work with outputs from CLI deployment scripts](./deployment-script-template.md#work-with-outputs-from-cli-scripts).

    The completed template can be found [here](https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/deployment-script/deploymentscript-keyvault.json).

1. To see the debugging process, place an error in the code by adding the following line to the deployment script:

    
    The correct command is `Write-Output` instead of `Write-Output1`.

1. Select **File** > **Save** to save the file.

## Deploy the template

1. Sign in to the [Azure Cloud Shell](https://shell.azure.com)

1. Choose your preferred environment by selecting either **PowerShell** or **Bash** (for CLI) on the upper-left corner. Restarting the shell is required when you switch.

    ![Azure portal Cloud Shell upload file](./media/template-tutorial-use-template-reference/azure-portal-cloud-shell-upload-file.png)

1. Select **Upload/download files**, and then select **Upload**. See the previous screenshot.  Select the file you saved in the previous section. After uploading the file, you can use the `ls` command and the `cat` command to verify the file was uploaded successfully.

1. Run the following Azure CLI or Azure PowerShell script to deploy the template.

    # [CLI](#tab/CLI)

    
    # [PowerShell](#tab/PowerShell)

    
    ---

    The deployment script service needs to create additional deployment script resources for script execution. The preparation and the cleanup process can take up to one minute to complete in addition to the actual script execution time.

    The deployment failed because the invalid command, `Write-Output1` is used in the script. You will get an error saying: