Table of Contents

Class RunInlinePowerShellAction

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents a plugin prerequisite action runs inline powershell

public class RunInlinePowerShellAction : PluginPrerequisiteAction
Inheritance
object
CorePropertyChanged
RunInlinePowerShellAction
Inherited Members

Constructors

RunInlinePowerShellAction(string, string, bool, string?)

Creates a new instance of a copy folder action

public RunInlinePowerShellAction(string name, string code, bool elevate = false, string? arguments = null)

Parameters

name string

The name of the action

code string

The inline code to run

elevate bool

A boolean indicating whether the file should run with administrator privileges

arguments string

Optional arguments to pass to your script, you are responsible for proper quoting etc.

Arguments are available in PowerShell as $args[0], $args[1] etc.

Properties

Arguments

Gets optional arguments to pass to your script, you are responsible for proper quoting etc.

Arguments are available in PowerShell as $args[0], $args[1] etc.

public string? Arguments { get; }

Property Value

string

Code

Gets the inline code to run

public string Code { get; }

Property Value

string

Elevate

Gets a boolean indicating whether the file should run with administrator privileges

public bool Elevate { get; }

Property Value

bool

Methods

Execute(CancellationToken)

Called when the action must execute

public override Task Execute(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task