I have a Windows executable which I run from powershell using:
& $command | Out-Default
The command can take several minutes to run and will periodically output messages to the console to show it's status. When I run this executable through powershell using the above style, I see the messages that the executables outputs shown in the powershell window. It looks ok, but I'd like to begin using Write-Progress to show the status of the executing command.
Is there any way to dynamically feed the output of this executable (as it runs) to Write-Progress so that it can show a progress bar with the message set to the last line of output from the executable?
Write-Progress
to know how far along the exe is. As far as I know, you would need to parse the output to calculate some sort of percentage from it. – Chad Baldwin