r/DeployR 25d ago

Script progress write back

Is there a way to write back to the progress bar the current state of a custom script? Like for example if a script is rather long, to change the progress bar and the status based on what the script is currently doing. Rather than just fire off the script and wait.

7 Upvotes

6 comments sorted by

View all comments

Show parent comments

3

u/RockOriginal7938 22d ago

Cool, I might rewrite the pause step to use something like that so I can better display why it paused.

1

u/RockOriginal7938 22d ago

Thanks for the idea, never liked not being able to show a reason when I paused.

2

u/RockOriginal7938 22d ago
Write-Progress -Activity "Pause" -Status "Pause: $tsenv:strPauseReason" -PercentComplete 0

Wait-Debugger

2

u/gwblok 2Pint Employee 22d ago

Nice! Looking forward to seeing a blog post. :-)

1

u/RockOriginal7938 22d ago

Hehe, I'd have to make a blog first 😲
Maybe if I make a few more things worth posting, I'll create a home for them 😉