Class RunInlinePowerShellAction
Represents a plugin prerequisite action runs inline powershell
public class RunInlinePowerShellAction : PluginPrerequisiteAction
- Inheritance
-
objectCorePropertyChangedRunInlinePowerShellAction
- 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
namestringThe name of the action
codestringThe inline code to run
elevateboolA boolean indicating whether the file should run with administrator privileges
argumentsstringOptional 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
Code
Gets the inline code to run
public string Code { get; }
Property Value
Elevate
Gets a boolean indicating whether the file should run with administrator privileges
public bool Elevate { get; }
Property Value
Methods
Execute(CancellationToken)
Called when the action must execute
public override Task Execute(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken