Add 'ValidateRange' to 'Percent' Parameter for 'Update-Progress' Helper Function

This will insure that the passed value is neither below zero nor higher than 100

Co-authored-by: Martin Wiethan <47688561+Marterich@users.noreply.github.com>
This commit is contained in:
Mr.k 2024-06-19 20:08:26 +03:00 committed by GitHub
parent bea7726587
commit 78178b0fba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@ function Update-Progress {
[string]$StatusMessage,
[Parameter(Mandatory, position=1)]
[ValidateRange(0,100)]
[int]$Percent,
[Parameter(position=2)]