Powershell

Frends.PowerShell.RunScript / 1.2.0

Summary

Runs a PowerShell script, inline or from a file, on the agent. This executes arbitrary code with the agent's own privileges, so the script deserves the same review and source control as any deployed code.

Typical use — Windows automation with no Task of its own — keep scripts in version control and never assemble one from untrusted input

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

Input parameters.

Name Type Default Example Description
Parameters PowerShellParameter[] foo, bar

Parameters for the script, provided switch parameters need to have a boolean value

ReadFromFile Boolean False false

Should the script be read from a file or from the Script parameter

ScriptFilePath String c:\temp\example.ps1

Location for the script file.

Script String c:\temp\example.ps1

Location for the script file.

LogInformationStream Boolean true

Should the information stream be logged. If false, log will be an empty string. If set to true, a lot of string data may be logged. Use with caution.

An unhandled error has occurred. Reload 🗙