Not on its own.
You cannot update the prompt asynchronously, because the prompt just returns the text, and it is called on the host whenever a top-level command is executed.
You can rewrite the invitation to do something like checking the data source or a variable that you are updating asynchronously. Thus, the prompt will not change during the execution of the command, but it will not freeze for a while, because it will simply look for data.
The more complicated thing is that it gets into the game, trying to look into the results of the performance after the fact. PowerShell does not support them if they are not tied to anything. To do this correctly, you need to override Out-Default (which works only in ISE, PowerGUI, etc., and not in the powershell.exe file). Reorienting it is not so difficult, but it requires knowledge of a lot of Voodoo PowerShell, even by my impressive standards.
On the bright side, I obviously thought a lot about it, and I have a module that does a lot, I just determine what I will do with it, and if it stays in its own module or joins one of the other modules that we create.
I will update this when this happens, but this roadmap should help a lot.
The short answer is that you cannot update the async prompt, but you can quickly twist it, and the tricks needed to do this open up a lot of colder doors.
Hope this helps
source share