RunCommand
Executes a PowerShell command with parameters, leave parameter value empty for a switch.
Last updated
Was this helpful?
Executes a PowerShell command with parameters, leave parameter value empty for a switch.
Task version: 1.2.0
Required Frends version: 5.5+
Required .NET version: 6.0
Compatible Agents: Crossplatform
Source code: https://github.com/FrendsPlatform/Frends.PowerShell/tree/main/Frends.PowerShell.Runcommand
Command : String
The PowerShell command to execute
Default: -
Example: Example-Command
Parameters : PowerShellParameter[]
Parameters for the command, provided switch parameters need to have a boolean value
Default: -
Example: [ foo, bar ]
LogInformationStream : Boolean
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.
Default: False
Example: false
Session : SessionWrapper
Session expression.
Default: -
Example: {System.Management.Automation.PowerShell} and {System.Management.Automation.Runspaces.LocalRunspace} values.
Result : IList<Object>
Result values.
Example: { foo, bar }
Errors : IList<String>
Errors.
Example: Encountered terminating error while executing powershell: Errors: "powershell.Streams.Error"
Log : String
Log.
Example: foobar.
Changelog for Task Frends.PowerShell.RunCommand.
Added explicit reference to Microsoft.Management.Infrastructure
Updated PowerShell version to 7.2.23
Memory leak fix by unloading assembly context after Task execution.
Targeting changed to only include .NET 6.0 (removed .NET Standard 2.0)
Initial implementation
Last updated
Was this helpful?
Was this helpful?

