Class PsOutput
- Namespace
- SunamoSelenium
- Assembly
- SunamoSelenium.dll
Provides methods for invoking PowerShell commands and processing their output.
public class PsOutput
- Inheritance
-
PsOutput
- Inherited Members
- Extension Methods
Methods
InvokeAsync(PowerShell)
Asynchronously invokes a PowerShell pipeline and returns the output as a list of strings. If errors occurred, returns formatted error messages instead.
public static Task<List<string>> InvokeAsync(PowerShell powerShell)
Parameters
powerShellPowerShellThe PowerShell instance to invoke.
Returns
ProcessErrorRecords(PSDataCollection<ErrorRecord>)
Processes a collection of PowerShell error records into formatted string messages.
public static List<string> ProcessErrorRecords(PSDataCollection<ErrorRecord> errors)
Parameters
errorsPSDataCollection<ErrorRecord>The collection of error records to process.
Returns
ProcessPSObjects(ICollection<PSObject>)
Converts a collection of PowerShell objects to a list of strings with Unix line endings.
public static List<string> ProcessPSObjects(ICollection<PSObject> collection)
Parameters
collectionICollection<PSObject>The collection of PowerShell objects to process.