The PowerShell Core and Windows PowerShell task types allow you to execute PowerShell scripts as part of a Loome Integrate job.

Though they are two separate task types, both PowerShell Core and Windows PowerShell use the same form for creating and modifying the task, so you can use this guide for both task types.

Core vs. Windows

If you are unsure about which task type you should choose, the difference between PowerShell Core and Windows PowerShell ultimately comes down to:

  • What platform you are running your agent on?
  • What kind of work are you trying to do with the processor?

If you are migrating a PowerShell Task over from Loome Integrate V5 and older, it’s recommended you use the Windows PowerShell task type.

Scenario Core vs. Windows
I need to utilize database tooling such as SSAS. Windows
I need to work with Windows administration tools such as Active Directory. Windows
I need to run basic operations such as calling a REST API webhook and working with the file system Core
I need to use PowerShell on Linux Core
This is my first time integrating PowerShell into a Loome Integrate job. Core

What Steps are Required to Set Up a Windows PowerShell Task?

Please follow these next few steps to use Windows PowerShell.

By default, PS Remoting is enabled on all Windows server machines, but it’s worth running the Enable-PSRemoting command in an elevated Windows PowerShell command window just to be sure.

You will also need administrative access for your agent.

If the service is running as a local system or as a service account that is not a local admin, please follow the next steps.

Run the following command from an elevated Windows PowerShell window.

Set-PSSessionConfiguration Microsoft.PowerShell -ShowSecurityDescriptorUI

This will cause a security box to pop up.

First, add the service account (or the computer account if running as a local system), to the permissions window.

Next, assign the ‘Execute’ permission to the account and click ok.

You will now be able to use Windows PowerShell in Loome Integrate.

Providing the Statement

The PowerShell editor provided in Loome Integrate includes syntax highlighting and will include various autocompletion options in future updates.

The PowerShell provided in the editor will be executed as is by Loome Integrate so ensure that it is error free before creating a task with it.

You can enable a setting for this task to run scripts in parallel. This will allow the Loome Integrate agent to execute multiple scripts in parallel, rather than in sequence. Learn more here.

Working with Parameters

Both PowerShell tasks support parameters and will convert them to variables that get injected into the PowerShell script. You can use them by referencing the parameter name.

Parameter Name Parameter Value Script Output
PersonName Alex Write-Output "Hello $PersonName" Hello Alex

Parameter values need to be set when the task is added to a job’s sequence. Learn more about parameters in the jobs documentation.

To learn how to use a File Connection as your Script Source to execute a script in a file in your Git Repository, please read more here.