# Write-Progress Help

**URL:** <https://forums.powershell.org/t/write-progress-help/1731>\
**Category:** PowerShell Help\
**Created:** [July 17, 2013, 6:45am UTC](https://forums.powershell.org/t/write-progress-help/1731 "2013-07-17T06:45:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![derek-engel](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@derek-engel](https://forums.powershell.org/u/derek-engel)\
**Post date:** [July 17, 2013, 6:45am UTC](https://forums.powershell.org/t/write-progress-help/1731/1 "2013-07-17T06:45:40Z")

</div>

In my script I have a Try and Catch block. Â Inside my catch block I’m calling five functions. Â These functions take a minute or two to complete. I would love to show my end user a progress bar when these functions are executing. Â I’ve asked the Google this question. Â It returns varying results, but none that make it clear how I should handle this. Â I’m curious if anyone has some pointers?

Since I have 5 functions I figure I could just write-progress for each function starting at 20% and increasing until the 5th one is done.

---

<div class="post-metadata">

**Author:** ![artb0514](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@artb0514](https://forums.powershell.org/u/artb0514)\
**Post date:** [July 18, 2013, 1:02am UTC](https://forums.powershell.org/t/write-progress-help/1731/2 "2013-07-18T01:02:19Z")

</div>

Put a line like this just before each of your 5 steps, but use 99 for the percent at the last item:

```
Write-Progress -Activity "Processing Catch Actions" -CurrentOperation "What I'm Doing Now" -PercentComplete 20
```

Put a line like this at the end of the catch block:

```
Write-Progress -Activity "Processing Catch Actions" -Completed
```

---

<div class="post-metadata">

**Author:** ![derek-engel](https://avatars.discourse-cdn.com/v4/letter/d/9f8e36/32.png) [@derek-engel](https://forums.powershell.org/u/derek-engel)\
**Post date:** [July 18, 2013, 5:35am UTC](https://forums.powershell.org/t/write-progress-help/1731/3 "2013-07-18T05:35:00Z")

</div>

Thank you very much Art. Â Just what I needed.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:57pm UTC](https://forums.powershell.org/t/write-progress-help/1731/4 "2024-05-16T20:57:42Z")

</div>


