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
⚠️ windows_tools
⚠️ missing_linux_example
Summary:
The documentation page is heavily focused on PowerShell modules and Windows-centric workflows. All code examples and module management instructions are provided using PowerShell cmdlets, with no equivalent Bash, CLI, or Linux-native examples. Internal cmdlets and features such as Orchestrator.AssetManagement.Cmdlets are only available on Windows Hybrid Runbook Workers, with Linux support explicitly excluded. The documentation repeatedly references Windows PowerShell versions and features, and there is no guidance or parity for Linux users or those using non-PowerShell environments.
Recommendations:
  • Provide equivalent examples and workflows using Azure CLI and/or Bash scripts for managing modules, especially for Linux Hybrid Runbook Workers.
  • Clearly indicate which features are Windows-only and offer alternative approaches for Linux environments where possible.
  • Include a section or table summarizing feature parity and limitations between Windows and Linux Hybrid Runbook Workers.
  • Add guidance or links for managing Python modules and runbooks on Linux, not just PowerShell.
  • When introducing tools or patterns (e.g., module import, runbook testing), present cross-platform options or explicitly mention Linux alternatives.
  • Update language to avoid assuming PowerShell as the default or only automation environment, and highlight support for other scripting languages where available.
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

Import-DscResource -ModuleName "<ModuleName>" -ModuleVersion "<version>"
$contosoConnection = Get-AutomationConnection -Name 'ContosoConnection' $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $contosoConnection.UserName, $contosoConnection.Password Connect-Contoso -Credential $cred }
$globalNum = 0 function Set-GlobalNum { param( [int] $num ) $globalNum = $num } function Get-GlobalNumTimesTwo { $output = $globalNum * 2 $output }
<# .SYNOPSIS Gets a Contoso User account #> function Get-ContosoUser { [CmdletBinding](DefaultParameterSetName='UseConnectionObject', ` HelpUri='https://www.contoso.com/docs/information')] [OutputType([String])] param( [Parameter(ParameterSetName='UserAccount', Mandatory=true)] [ValidateNotNullOrEmpty()] [string] $UserName, [Parameter(ParameterSetName='UserAccount', Mandatory=true)] [ValidateNotNullOrEmpty()] [string] $Password, [Parameter(ParameterSetName='ConnectionObject', Mandatory=true)] [ValidateNotNullOrEmpty()] [Hashtable] $Connection ) switch ($PSCmdlet.ParameterSetName) { "UserAccount" { $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $UserName, $Password Connect-Contoso -Credential $cred } "ConnectionObject" { Connect-Contoso -Connection $Connection } } }
$contosoConnection = Get-AutomationConnection -Name 'ContosoConnection' Connect-Contoso -Connection $contosoConnection }
function Get-ContosoUser { [OutputType([String])] param( [string] $Parameter1 ) # <script location here> }
You can also use the same cmdlet to import a module from the PowerShell Gallery directly. Make sure to grab `ModuleName` and `ModuleVersion` from the [PowerShell Gallery](https://www.powershellgallery.com).
### Import modules from the PowerShell Gallery You can import [PowerShell Gallery](https://www.powershellgallery.com) modules either directly from the Gallery or from your Automation account. To import a module directly from the PowerShell Gallery: 1. Go to [https://www.powershellgallery.com](https://www.powershellgallery.com) and search for the module to import. 2. Under **Installation Options**, on the **Azure Automation** tab, select **Deploy to Azure Automation**. This action opens the Azure portal. 3. On the Import page, select your Automation account, and select **OK**. ![Screenshot of the PowerShell Gallery import module](../media/modules/powershell-gallery.png) To import a PowerShell Gallery module directly from your Automation account: 1. In the portal, search for and select **Automation Accounts**. 1. On the **Automation Accounts** page, select your Automation account from the list. 1. Under **Shared Resources**, select **Modules**. 1. Select **Browse gallery**, and then search the Gallery for a module. 1. Select the module to import, and select **Import**. 1. Select **OK** to start the import process. ![Screenshot of importing a PowerShell Gallery module from the Azure portal](../media/modules/gallery-azure-portal.png) ## Delete modules If you have problems with a module, or you need to roll back to a previous version of a module, you can delete it from your Automation account. You can't delete the original versions of the [default modules](#default-modules) that are imported when you create an Automation account. If the module to delete is a newer version of one of the [default modules](#default-modules), it rolls back to the version that was installed with your Automation account. Otherwise, any module you delete from your Automation account is removed. ### Delete modules in the Azure portal To remove a module in the Azure portal: 1. In the portal, search for and select **Automation Accounts**. 1. On the **Automation Accounts** page, select your Automation account from the list. 1. Under **Shared Resources**, select **Modules**. 1. Select the module you want to remove. 1. On the Module page, select **Delete**. If this module is one of the [default modules](#default-modules), it rolls back to the version that existed when the Automation account was created. ### Delete modules by using PowerShell To remove a module through PowerShell, run the following command: