Enable progress bar in PowerShell 7

Page content

In PowerShell 7, I have noticed that on my machine the Progress bar was not showing by default. I found that annoying, so I searched for how to get it back; this was very easy in the end.

Reveiling it again

All you have to do is add this line of code to your script

$ProgressPreference = 'Continue'

Show it at the top

This line will display the progress bar again; the only difference with the previous PowerShell versions is that it now shows it inline instead of at the top of the window.

$PSStyle.Progress.View = 'Classic'

The snippet above will show it at the top of the window and is available in PowerShell 7.2.

References