Task Steps

Task steps are the building blocks of automation tasks in AZExecute. Each step performs a specific action, and steps execute in sequence according to their execution order. This guide covers all available step types and their configuration options.


Available Step Types

AZExecute supports seven different step types, each designed for specific automation scenarios:

1. PowerShell Script - Execute custom scripts on AZExecute agents

2. Runbook - Run Azure Automation Runbooks

3. Run Command - Execute commands on Azure VMs

4. Azure Key Vault - Manage certificates in Key Vault

5. Certificate Install - Deploy certificates to machines

6. Manage Windows Service - Control Windows services

7. Execute DevOps Pipeline - Trigger Azure DevOps pipelines

Step Types Overview

1. PowerShell Script Step

Execute PowerShell scripts on machines running the AZExecute agent. This is the most flexible step type for custom automation logic.


Configuration Options:

Select Script:

Choose from your stored scripts. The script content is managed separately in the Scripts section of AZExecute.

Target Machine:

Select the AZExecute agent (hybrid machine) where the script will execute. The agent must be online and connected.

PowerShell Version:

Choose between PowerShell 5.1 (Windows PowerShell) or PowerShell 7+ (PowerShell Core). Ensure the selected version is installed on the target machine.

Script Parameters:

If your script defines parameters, you can provide values here. Parameters can be static values or references to global variables using {{"{{"}}VariableName{{"}}"}}.

PowerShell Script Step Configuration

PowerShell scripts run with the permissions of the AZExecute agent service account. Ensure the account has necessary permissions for your automation tasks.


Use Cases:

• Custom automation logic not available in other step types

• File system operations on on-premises servers

• Integration with legacy systems or applications

• Data processing and transformation


2. Runbook Step

Execute Azure Automation Runbooks as part of your automation task. Runbooks can run in Azure or on hybrid workers for on-premises operations.


Configuration Options:

Automation Account:

Select the Azure Automation Account containing your runbook. You must have appropriate permissions to execute runbooks in the selected account.

Runbook:

Choose the specific runbook to execute. Only published runbooks are available for selection.

Hybrid Worker Group:

Specify where the runbook should execute. Leave empty to run in Azure, or select a hybrid worker group to run on-premises.

Runbook Parameters:

Provide values for runbook parameters. Parameters are detected automatically from the runbook definition.

Runbook Step Configuration

Use Cases:

• Leveraging existing Azure Automation investments

• Azure resource management tasks

• Complex workflows requiring Azure-managed credentials


3. Run Command Step

Execute scripts on Azure VMs using the Azure Run Command feature. No agent installation required on the target VM.


Configuration Options:

Select Script:

Choose a stored script to execute on the target VM.

Target VM:

Select the Azure VM where the command will run. The VM must be in a running state.

Run Command Step Configuration

Run Command has a timeout limit and is best suited for short-running scripts. For long-running operations, consider using PowerShell Script steps with AZExecute agents.


Use Cases:

• Quick operations on Azure VMs without agent installation

• Emergency troubleshooting and remediation

• Configuration changes on cloud-only infrastructure


4. Azure Key Vault Step

Install or update certificates in Azure Key Vault. This step type is primarily available for Certificate-type automation tasks.


Configuration Options:

Key Vault:

Select the Azure Key Vault where the certificate will be stored or updated. AZExecute automatically validates and configures necessary permissions (RBAC roles or access policies).

Certificate Name:

Specify the certificate name in Key Vault. You can select an existing certificate or enter a new name to create one.

Key Vault Step Configuration

When you select a Key Vault, AZExecute automatically checks and configures the required permissions for both your user account and the application service principal.


Use Cases:

• Deploying renewed certificates to Azure Key Vault

• Centralizing certificate storage for Azure services

• Automated certificate lifecycle management


5. Certificate Install Step

Deploy certificates to machines running AZExecute agents. Available only for Certificate-type automation tasks.


Configuration Options:

Target Machine:

Select the AZExecute agent where the certificate will be installed.

Certificate Store:

Specify the Windows certificate store location (e.g., LocalMachine\My, CurrentUser\Personal).

Certificate Install Step Configuration

Use Cases:

• Deploying renewed certificates to application servers

• Updating certificates on IIS servers

• Certificate installation on domain controllers


6. Manage Windows Service Step

Control Windows services on machines running AZExecute agents. Start, stop, restart, or configure service properties.


Configuration Options:

Target Machine:

Select the AZExecute agent where the service is running.

Service Name:

Enter the internal service name (not the display name). For example, "W3SVC" for IIS, not "World Wide Web Publishing Service".

Action:

Choose the action to perform: Start, Stop, Restart, or Configure.

Startup Type (Configure action only):

Set the service startup type: Automatic, Manual, or Disabled.

Startup Parameters (Configure action only):

Optional command-line parameters to pass to the service at startup.

Service Action Step Configuration

Use Cases:

• Restarting IIS after certificate deployment

• Recycling application services during maintenance

• Configuring service startup behavior


7. Execute DevOps Pipeline Step

Trigger Azure DevOps YAML pipelines as part of your automation workflow. Integrate deployment pipelines with broader automation tasks.


Configuration Options:

Organization:

Select your Azure DevOps organization. You must have access to the organization.

Project:

Choose the Azure DevOps project containing your pipeline.

Pipeline:

Select the specific pipeline to execute. Only YAML pipelines are supported.

Branch:

Specify the branch to use for pipeline execution (e.g., main, develop).

Pipeline Parameters:

Provide values for pipeline parameters defined in your YAML file. These are detected automatically from the pipeline definition.

DevOps Pipeline Step Configuration

Use Cases:

• Triggering application deployments after infrastructure changes

• Coordinating multi-stage deployments

• Integration testing as part of automation workflows


Common Step Settings

All step types share common execution settings that control their behavior within the automation task:

Execution Order: Steps execute in numerical order. Use the up/down arrows to reorder steps.

Execute in Parallel: Run this step concurrently with previous steps instead of waiting.

Stop on Failure: Halt the entire task if this step fails (enabled by default).

Delay Before Next Step: Wait a specified number of minutes before proceeding to the next step.

Enabled/Disabled: Temporarily disable steps without deleting them. Disabled steps are skipped during execution.

Common Step Settings

If you encounter any issues or need further assistance, please contact us at

info@azexecute.com

. Our support team is here to help you.

An unhandled error has occurred. Reload 🗙
An unhandled error has occurred. Reload 🗙