---
title: "PSCall"
---
Calls a PowerShell Script that is stored as an asset.
PSCall1 [DefaultArgument] (
[Arg1: Arg1Value],
[Arg2: Arg2Value],
[OutputArgument => $CustomVariable]
);
This operation may be prefixed with PowerShell::
, although this is a built-in namespace and isn't really necessary.
Note: An argument may be explicitly converted to an integral type by prefixing the value with [type::<typeName>], where <typeName> is one of: int, uint, long, ulong, double, decimal. Normally this conversion is performed automatically and this is not necessary.
# execute the hdars.ps1 script, passing Argument1 and Aaaaaarg2 as variables, and capturing the value of the PowerShell variable MyVariableSetInPowerShell to the OtterScript variable $MyVariable
pscall hdars (
Argument1: hello,
Aaaaaarg2: World,
MyVariableSetInPowerShell => $MyVariable
);