Click or drag to resize
Galactic API

PowerShellRunSynchronously Method

Runs a PowerShell command/script synchronously.

Namespace:  Galactic.PowerShell
Assembly:  Galactic.PowerShell (in Galactic.PowerShell.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax
public static Collection<PSObject> RunSynchronously(
	string commandText,
	ref Runspace runspace,
	EventLog log = null,
	PSDataCollection<string> input = null,
	params KeyValuePair<string, Object>[] parameterList
)

Parameters

commandText
Type: SystemString
The text of the command to run.
runspace
Type: Runspace
An open PowerShell Runspace this script will use to invoke its pipeline.
log (Optional)
Type: Galactic.EventLogEventLog
[Optional] The event log to log execptions to. May be null for no logging.
input (Optional)
Type: PSDataCollectionString
[Optional] A collection of strings representing command-line input sent to the script during execution.
parameterList
Type: System.Collections.GenericKeyValuePairString, Object
An array of key/value objects defining additional parameters to supply to the PowerShell script.

Return Value

Type: CollectionPSObject
A collection of PSObjects that are the result of the script/command run. Null if an error occurred while processing the command / script.
See Also