-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement "trickle" parsing #194
Comments
Hi @DennisL68 -- thank you. PowerShell returns each object as quickly as the command sends it to the output. When there is a filter, job or sort - The command performing the sort holds the objects from the output, until it can complete the sort, then returns all the objects in the correct sort order. In the case of background jobs, you can get the results before the job has completed with receive-job, but I gather this is not the result you're after. For more information on PowerShell jobs, see https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_jobs?view=powershell-7.3#getting-the-results-of-a-job |
Ok, what I'm having issues with in particular is psconfig.exe for SharePoint server. I would like to have the option to abort the run on the first error detected by my parser, instead of having to wait for the "final" result until the end. |
@DennisL68 -- after re-reading this - I would also suggest looking at the json property StreamOutput of the output handler. Set this to true and the output will stream to the handler. Here's an example: https://github.com/PowerShell/Crescendo/blob/master/Microsoft.PowerShell.Crescendo/Samples/ifconfig.crescendo.json |
Yes, but... MS SharePoint I'm using my own parser function. |
@DennisL68 If you look at the ifconfig example you'll see that it also doesn't provide json output by itself. |
What is jc? Judging by the syntax it seems to be some kind of Linux command? |
Summary of the new feature / enhancement
As a user of a command that provides multiple outputs over time before finishing
I'd like to be able to start parsing the output before the complete command has ended
So that I can take action on certain statuses in the output
Proposed technical implementation details (optional)
I don't know how feasible this is though...
The text was updated successfully, but these errors were encountered: