public static IEnumerable <T> RunScript <T>(this EngineIntrinsics engineIntrinsics, string script) where T : class => PsHelpers.RunScript <T>(engineIntrinsics.InvokeCommand, script);
public static IEnumerable <T> RunScript <T>(this EngineIntrinsics engineIntrinsics, ScriptBlock block) => PsHelpers.RunScript <T>(engineIntrinsics.InvokeCommand, block.ToString());
public static IEnumerable <T> RunScript <T>(this PSCmdlet cmdlet, string script) where T : class => PsHelpers.RunScript <T>(cmdlet.InvokeCommand, script);
public static IEnumerable <T> RunScript <T>(this PSCmdlet cmdlet, ScriptBlock block) => PsHelpers.RunScript <T>(cmdlet.InvokeCommand, block.ToString());