You can run workflows to invoke an external or custom script on a PowerShell host.

Invoke a PowerShellScript

You can run an existing or custom PowerShell script on a host in the plug-in inventory.

Prerequisites

  • Verify that you are logged in to the Automation Orchestrator Client as an administrator.
  • Verify that you have a connection to a PowerShell host from the Inventory view.

Procedure

  1. Navigate to Library > Workflows and enter the powershell tag in the workflow search box.
  2. Locate the Invoke a PowerShell script workflow and click Run.
  3. On the PowerShell Host tab, select a PowerShell host on which to run the script.
  4. On the Script tab, in the Script text box, type or paste the PowerShell script that you want to run.
  5. Click Run.

Invoke an External Script

You can run an external PowerShell script on a host in the plug-in inventory.

External PowerShell scripts are contained in .ps1 files. The .ps1 file that you want to run must be stored on the PowerShell host.

Prerequisites

  • Verify that you are logged in to the Automation Orchestrator Client as an administrator.
  • Verify that you have a connection to a PowerShell host from the Inventory view.
  • Verify that you have access to other .ps1 files that the script might reference.

Procedure

  1. Navigate to Library > Workflows and enter the powershell tag in the workflow search box.
  2. Locate the Invoke an external script workflow and click Run.
  3. On the PowerShell Host tab, select a PowerShell host on which to run the script.
  4. On the External Script tab, in the Name text box, type the filename of the external .ps1 script that you want to run.
    Note: If the .ps1 file is not in the default folder, you must type the absolute file path. You can use system environment variables to specify script paths. For example, $env:HOMEPATH\test1.ps1.
  5. In the Arguments text box, type the script arguments.
    The valid syntax is the same as used in the PowerShell console.
  6. Click Run.