PowerShellScriptResource Constructors
ClassConstructors2 members
Represents a PowerShell script resource.
Constructor(string, ScriptBlock, PowerShellRunspacePoolResource) Section titled Constructor(string, ScriptBlock, PowerShellRunspacePoolResource) Initializes a new instance of the
PowerShellScriptResource class, representing a resource for executing PowerShell scripts. public class PowerShellScriptResource{ public PowerShellScriptResource( string name, ScriptBlock script, PowerShellRunspacePoolResource parent) { // ... }}Parameters
namestringThe name of the resource. This must be a valid resource name.scriptScriptBlock The ScriptBlock to be executed.parentPowerPowerShellRunspacePoolResource that provides the runspace pool for script execution. Cannot be null.Remarks
This class is designed to manage the execution of PowerShell scripts within a specified runspace pool. The script execution is tied to a cancellation token, allowing the script to be stopped when requested.
Constructor(string, FileInfo, PowerShellRunspacePoolResource) Section titled Constructor(string, FileInfo, PowerShellRunspacePoolResource) Initializes a new instance of the
PowerShellScriptResource class, representing a resource for executing PowerShell scripts. public class PowerShellScriptResource{ public PowerShellScriptResource( string name, FileInfo scriptFile, PowerShellRunspacePoolResource parent) { // ... }}Parameters
namestringThe name of the resource. This must be a valid resource name.scriptFile FileInfo The file containing the PowerShell script to be executed. Must be a valid file path and not null.parentPowerPowerShellRunspacePoolResource that provides the runspace pool for script execution. Cannot be null.Remarks
This class is designed to manage the execution of PowerShell scripts within a specified runspace pool. The script execution is tied to a cancellation token, allowing the script to be stopped when requested.