Skip to content

Powershell script

Ryan Newington edited this page Apr 12, 2018 · 1 revision

PowerShell Script

Summary

This transform allows you to write a basic powershell script to transform values

Parameters

Parameter name Description
File The path to a PowerShell .ps1 file

Input Type

The transform accepts any input type.

Multiple input values

The transform accepts multiple input values which are processed according to the script

Return Type

The transform return type is determined by the script

Usage

The PowerShell transform contains a single function called Transform-Values, with a single parameter called $items

The transform is expected to process the incoming objects and write one or more transformed values to the pipeline.

This very simple example converts all the incoming values to string, and uppercases the values.

function Transform-Values
{
	param ($items)

	foreach ($item in $items)
	{
		write-output $item.ToString().ToUpper();
	}
}