PowerShell

Introduction

This document provides a brief overview of the integration between Automate and PowerShell, explaining how PowerShell scripts can be executed to automate processes using PowerShell library actions.

The integration enables users to execute PowerShell scripts within Automate, facilitating automation of various tasks.

What is PowerShell?

Overview of PowerShell: PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language. It is designed to automate system administration tasks and streamline management processes.

Key Features:

  • Script Execution: Execute PowerShell scripts to perform tasks.

  • Variable Assignment: Assign output of scripts to variables for further processing.

  • Flexible Script Handling: Supports selection of script files or direct entry of PowerShell commands.

Automate Integration with PowerShell

Overview of Integration: Automate integrates with PowerShell to execute scripts and automate various tasks within workflows.

Examples of Automated Tasks:

  • Running PowerShell scripts to perform system administration tasks.

  • Automating configuration changes using PowerShell commands.

  • Integrating PowerShell scripts into complex automation workflows.

Using the Integration

Credentials

How to Create Credentials: No specific credentials are required for executing PowerShell scripts within Automate.

Data Management

Purpose: N/A

Content: No data management steps are required for executing PowerShell scripts within Automate.

How To Use Actions

Run

Description: Execute a PowerShell script.

Purpose: Execute PowerShell scripts to perform automation tasks.

Usage:

  1. Select the Script variable defined in the PowerShell Open action configuration.

  2. Choose a PowerShell script file or enter PowerShell commands in the PowerShell Opened field.

  3. Assign the output of the PowerShell script to a variable for further processing.

Inputs:

  • Script Variable

  • PowerShell Script or Commands

Outputs:

  • Output of the PowerShell Script

Select File: We can just choose the PowerShell file from the local computer and upload it to do action. This action will automatically save the file to Data Store too.
Custom String: With this option we can select the PowerShell from the Data Store.
Manual Input: We can just write the PowerShell code itself to the action itself. For doing this, after choosing the manual input action choose the β€œOpen Code Editor”.
At the end of the action, we need to define a string variable to run the command.

Additional Tips

Last updated

Was this helpful?