Powershell

The Powershell Core and Windows Powershell task types allow you to execute Powershell scripts as part of a Loome Integrate job. Whilst they are separate task types, both Core and Windows variants use the same form for creating and modifying the task.

Core vs. Windows

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 utilise 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.

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.

Please 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.

Working with Parameters

Both Powershell tasks support parameters and will convert them to variables that get injected into the Powershell script.

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.