PoshRSJob icon indicating copy to clipboard operation
PoshRSJob copied to clipboard

Wait-RSJob - customizable progress bar

Open jeffchulg opened this issue 4 years ago • 5 comments

Fixes # .

Changes proposed in this pull request: Wait-RsJob:

  • Switch to boolean for parameter that shows progress bar
  • Enable dynamic title and message in displayed progress bar

How to test this code:

  • Run as usual

Has been tested on (remove any that don't apply):

  • Powershell 5 and Windows 10

jeffchulg avatar Aug 31 '20 06:08 jeffchulg

Switch to boolean for parameter that shows progress bar

what is the reason for this replacement ?

MVKozlov avatar Sep 01 '20 19:09 MVKozlov

@MVKozlov I think it's preferable when you have a config file in which you tell "show progress" or not... Otherwise, there is the need to create two different calls, just for that.

jeffchulg avatar Sep 02 '20 19:09 jeffchulg

Did you know that -Parameter:value syntax acceptable for both switches and booleans ? Seems not ;) Its a common practice to use it for example for -Confirm:$confirm cases and for -ShowProgress too

MVKozlov avatar Sep 02 '20 19:09 MVKozlov

No, I didn't know. So, Switch or boolean are very similar then

jeffchulg avatar Sep 03 '20 04:09 jeffchulg

yes, but switch can be used as a boolean and does not require parameter. But boolean can not and require value. It is a breaking change

MVKozlov avatar Sep 03 '20 11:09 MVKozlov