Otter Documentation

powershell - PSCall

  • Last Modified: 2019-07-30

This is generated from the built-in components of Otter 2.2, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your Otter instance to see exactly what operations are available.

PSCall

Calls a PowerShell Script that is stored as an asset.

Operation type:

Executing - this operation will perform a specified action or actions on a remote server.

Script usage:

PSCall [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.

Example:

# execute the hdars.ps1 script, passing Argument1 and Aaaaaarg2 as variables, and capturing the value of OutputArg as $MyVariable
pscall hdars (
  Argument1: hello,
  Aaaaaarg2: World,
  OutputArg => $MyVariable
);

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit ce197caa on master