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_tools
⚠️ missing_linux_example
⚠️ windows_first
Summary:
The documentation is heavily focused on Windows PowerShell and PowerShell Workflow, with all examples, terminology, and workflows centered around PowerShell cmdlets and syntax. There is no mention of Linux, Bash, or cross-platform scripting, and the only scripting language referenced is PowerShell. The documentation assumes familiarity with Windows-centric tools and patterns, and does not provide Linux equivalents or alternatives.
Recommendations:
  • Explicitly state that graphical runbooks in Azure Automation currently only support PowerShell and PowerShell Workflow, and clarify if/when support for other scripting languages (such as Python or Bash) is planned.
  • If Linux or cross-platform support is available or planned, provide equivalent examples using Bash or Python, and reference relevant modules or tools.
  • Mention the limitations of graphical runbooks for Linux-based automation, and provide guidance or links for users who wish to automate Linux environments (e.g., using textual Python runbooks or hybrid worker solutions).
  • Include a section comparing graphical runbooks with textual runbooks, highlighting cross-platform options and their respective use cases.
  • Avoid assuming all users are familiar with Windows PowerShell; provide introductory links or context for users from Linux or non-Windows backgrounds.
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

When you use a conditional link, the data available from the source activity to other activities in that branch is filtered by the condition. If an activity is the source to multiple links, the data available to activities in each branch depends on the condition in the link connecting to that branch. For example, the `Start-AzVM` activity in the runbook below starts all virtual machines. It has two conditional links. The first conditional link uses the expression `$ActivityOutput['Start-AzVM'].IsSuccessStatusCode -eq $true` to filter if the `Start-AzVM` activity completes successfully. The second conditional link uses the expression `$ActivityOutput['Start-AzVM'].IsSuccessStatusCode -ne $true` to filter if the `Start-AzVm` activity fails to start the virtual machine. ![Conditional link example](media/automation-graphical-authoring-intro/runbook-conditional-links.png) Any activity that follows the first link and uses the activity output from `Get-AzureVM` only retrieves the virtual machines that were started at the time when `Get-AzureVM` was run. Any activity that follows the second link only gets the virtual machines that were stopped at the time when `Get-AzureVM` was run. Any activity following the third link gets all virtual machines regardless of their running state. ### Use junctions A junction is a special activity that waits until all incoming branches have completed. This allows the runbook to run multiple activities in parallel and ensure that all have completed before moving on. While a junction can have an unlimited number of incoming links, only one of those links can be a pipeline. The number of incoming sequence links is not constrained. You can create the junction with multiple incoming pipeline links and save the runbook, but it will fail when it is run. The example below is part of a runbook that starts a set of virtual machines while simultaneously downloading patches to be applied to those machines. It uses a junction to ensure that both processes are completed before the runbook continues. ![Junction](media/automation-graphical-authoring-intro/runbook-junction.png) ### Work with cycles A cycle is formed when a destination activity links back to its source activity or to another activity that eventually links back to its source. Graphical authoring does not currently support cycles. If your runbook has a cycle, it saves properly but receives an error when it runs. ![Cycle](media/automation-graphical-authoring-intro/runbook-cycle.png) ### Share data between activities Any data that an activity outputs with an outgoing link is written to the databus for the runbook. Any activity in the runbook can use data on the databus to populate parameter values or include in script code. An activity can access the output of any previous activity in the workflow. How the data is written to the databus depends on the type of link on the activity. For a pipeline link, the data is output as multiple objects. For a sequence link, the data is output as an array. If there is only one value, it is output as a single-element array. Your runbook has two ways to access data on the databus: * Use an activity output data source. * Use a PowerShell expression data source. The first mechanism uses an activity output data source to populate a parameter of another activity. If the output is an object, the runbook can specify a single property. ![activity output](media/automation-graphical-authoring-intro/activity-output-datasource-revised20165.png) The second data access mechanism retrieves the output of an activity in a PowerShell expression data source or a workflow script activity with an `ActivityOutput` variable, using the syntax shown below. If the output is an object, your runbook can specify a single property.
For example, the following expression creates a hashtable to be used as the data source for an activity parameter that expects a hashtable of values for an internet search.
After you configure a retry condition for an activity, the activity includes two visual cues to remind you. One is presented in the activity and the other is shown when you review the configuration of the activity. ![Activity Retry Visual Indicators](media/automation-graphical-authoring-intro/runbook-activity-retry-visual-cue.png) ### Workflow Script control A workflow Script control is a special activity that accepts PowerShell or PowerShell Workflow script, depending on the type of graphical runbook being authored. This control provides functionality that might not be available by other means. It cannot accept parameters, but it can use variables for activity output and runbook input parameters. Any output of the activity is added to the databus. An exception is output with no outgoing link, in which case the output is added to the output of the runbook. For example, the following code performs date calculations using a runbook input variable named `NumberOfDays`. It then sends a calculated DateTime value as output to be used by subsequent activities in the runbook.
## Use links for workflow A link in a graphical runbook connects two activities. It is displayed on the canvas as an arrow pointing from the source activity to the destination activity. The activities run in the direction of the arrow with the destination activity starting after the source activity completes. ### Create a link You can create a link between two activities by selecting the source activity and clicking the circle at the bottom of the shape. Drag the arrow to the destination activity and release. ![Create a link](media/automation-graphical-authoring-intro/create-link-options.png) Select the link to configure its properties in the Configuration blade. Properties include the link type, which is described in the following table. | Link Type | Description | |:--- |:--- | | Pipeline |The destination activity runs once for each object output from the source activity. The destination activity does not run if the source activity results in no output. Output from the source activity is available as an object. | | Sequence |The destination activity runs only once when it receives output from the source activity. Output from the source activity is available as an array of objects. | ### Start runbook activity A graphical runbook starts with any activities that do not have an incoming link. There is often only one activity that acts as the starting activity for the runbook. If multiple activities do not have an incoming link, the runbook starts by running them in parallel. It follows the links to run other activities as each completes. ### Specify link conditions When you specify a condition on a link, the destination activity runs only if the condition resolves to True. You typically use an `ActivityOutput` variable in a condition to retrieve the output from the source activity. For a pipeline link, you must specify a condition for a single object. The runbook evaluates the condition for each object output by the source activity. It then runs the destination activity for each object that satisfies the condition. For example, with a source activity of `Get-AzVM`, you can use the following syntax for a conditional pipeline link to retrieve only virtual machines in the resource group named Group1.
### Use checkpoints You can set [checkpoints](automation-powershell-workflow.md#use-checkpoints-in-a-workflow) in a graphical PowerShell Workflow runbook by selecting **Checkpoint runbook** on any activity. This causes a checkpoint to be set after the activity runs. ![Checkpoint](media/automation-graphical-authoring-intro/set-checkpoint.png) Checkpoints are only enabled in graphical PowerShell Workflow runbooks, and are not available in graphical runbooks. If the runbook uses Azure cmdlets, it should follow any checkpointed activity with a `Connect-AzAccount` activity. The connect operation is used in case the runbook is suspended and must restart from this checkpoint on a different worker. ## Handle runbook input A runbook requires input either from a user starting the runbook through the Azure portal or from another runbook, if the current one is used as a child. For example, for a runbook that creates a virtual machine, the user might need to provide such information as the name of the virtual machine and other properties each time the runbook starts. The runbook accepts input by defining one or more input parameters. The user provides values for these parameters each time the runbook starts. When the user starts the runbook using the Azure portal, the user is prompted to provide values for each input parameter supported by the runbook. When authoring your runbook, you can access its input parameters by clicking **Input and output** on the runbook toolbar. This opens the Input and Output control where you can edit an existing input parameter or create a new one by clicking **Add input**. ![Add input](media/automation-graphical-authoring-intro/runbook-edit-add-input.png) Each input parameter is defined by the properties in the following table: | Property | Description | |:--- |:--- | | Name | Required. The name of the parameter. The name must be unique within the runbook. It must start with a letter and can contain only letters, numbers, and underscores. The name cannot contain a space. | | Description |Optional. Description of the purpose for the input parameter. | | Type | Optional. Data type expected for the parameter value. The Azure portal provides an appropriate control for the data type for each parameter when prompting for input. Supported parameter types are String, Int32, Int64, Decimal, Boolean, DateTime, and Object. If a data type is not selected, it defaults to String.| | Mandatory | Optional. Setting that specifies if a value must be provided for the parameter. If you choose `yes`, a value must be provided when the runbook is started. If you choose `no`, a value is not required when the runbook is started, and a default value can be used. The runbook cannot start if you do not provide a value for each mandatory parameter that does not have a default value defined. | | Default Value | Optional. The value used for a parameter if one is not passed in when the runbook is started. To set a default value, choose `Custom`. Select `None` if you don't want to provide any default value. | ## Handle runbook output Graphical authoring saves data created by any activity that does not have an outgoing link to the [output of the runbook](./automation-runbook-output-and-messages.md). The output is saved with the runbook job and is available to a parent runbook when the runbook is used as a child. ## Work with PowerShell expressions One of the advantages of graphical authoring is that it allows you to build a runbook with minimal knowledge of PowerShell. Currently, though, you do need to know a bit of PowerShell for populating certain [parameter values](#use-activities) and for setting [link conditions](#use-links-for-workflow). This section provides a quick introduction to PowerShell expressions. Full details of PowerShell are available at [Scripting with Windows PowerShell](/powershell/scripting/overview). ### Use a PowerShell expression as a data source You can use a PowerShell expression as a data source to populate the value of an [activity parameter](#use-activities) with the results of PowerShell code. The expression can be a single line of code that performs a simple function or multiple lines that perform some complex logic. Any output from a command that is not assigned to a variable is output to the parameter value. For example, the following command outputs the current date.
### Compare values Use [comparison operators](/powershell/module/microsoft.powershell.core/about/about_comparison_operators) to compare values or determine if a value matches a specified pattern. A comparison returns a value of either True or False. For example, the following condition determines if the virtual machine from an activity named `Get-AzureVM` is currently stopped.
You can join multiple conditions in your runbook using a [logical operator](/powershell/module/microsoft.powershell.core/about/about_logical_operators), such as `-and` or `-or`. For example, the following condition checks to see if the virtual machine in the previous example is in a state of Stopped or Stopping.
### Use hashtables [Hashtables](/powershell/module/microsoft.powershell.core/about/about_hash_tables) are name-value pairs that are useful for returning a set of values. You might also see a hashtable referred to as a dictionary. Properties for certain activities expect a hashtable instead of a simple value. Create a hashtable using the following syntax. It can contain any number of entries, but each is defined by a name and value.