public static T InvokeFirst <T>(this System.Management.Automation.Cmdlet cmd) { var results = cmd.Invoke <T>(); T output = results.First(); return(output); }
public static void InvokeVoid(this System.Management.Automation.Cmdlet cmd) { var results = cmd.Invoke(); foreach (object item in results) { } }
internal PowerShellOutputAppender(System.Management.Automation.Cmdlet cmdlet) { _cmdlet = cmdlet ?? throw new ArgumentNullException(nameof(cmdlet)); }