Class PsOutput
- Namespace
- SunamoPS
- Assembly
- SunamoPS.dll
Base class for processing PowerShell output and error records.
public class PsOutput
- Inheritance
-
PsOutput
- Derived
- Inherited Members
- Extension Methods
Methods
InvokeAsync(PowerShell)
Invokes a PowerShell instance asynchronously and returns output or error messages.
public static Task<List<string>> InvokeAsync(PowerShell powerShell)
Parameters
powerShellPowerShellPowerShell instance to invoke.
Returns
ProcessErrorRecords(PSDataCollection<ErrorRecord>)
Converts a collection of ErrorRecords into a list of formatted error strings.
public static List<string> ProcessErrorRecords(PSDataCollection<ErrorRecord> errors)
Parameters
errorsPSDataCollection<ErrorRecord>Collection of PowerShell error records.
Returns
ProcessPSObjects(ICollection<PSObject>)
Converts a collection of PSObjects into a list of strings with Unix line endings.
public static List<string> ProcessPSObjects(ICollection<PSObject> psObjects)
Parameters
psObjectsICollection<PSObject>Collection of PowerShell objects.