Fixed all instances where ValidateRange("$number","$number") is instead of ValidateRange($number,$number)
Issue:
There is an error in the notation of the validation range, which is causing issues when inputting values within that specified range.
Example:
PS C:\Users\thoma> Add-IntuneWin32AppAssignmentGroup -EnableRestartGracePeriod $true -RestartGracePeriod 340
Add-IntuneWin32AppAssignmentGroup : Cannot validate argument on parameter 'RestartGracePeriod'. The 340 argument is greater than the maximum allowed range of 20160.
Supply an argument that is less than or equal to 20160 and then try the command again.
At line:1 char:87
+ ... signmentGroup -EnableRestartGracePeriod $true -RestartGracePeriod 340
+ ~~~
+ CategoryInfo : InvalidData: (:) [Add-IntuneWin32AppAssignmentGroup], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Add-IntuneWin32AppAssignmentGroup
For example RestartGracePeriod 340.
340 is a valid input because 1<340<20160
But because the ValidateRange is incorrect powershell rejects it with the error that 340 (number) is bigger then 20160 (string)
Change:
Fixed all instances where ValidateRange("$number","$number") is instead of ValidateRange($number,$number)
Issue:
There is an error in the notation of the validation range, which is causing issues when inputting values within that specified range.
Example:
For example RestartGracePeriod 340. 340 is a valid input because 1<340<20160 But because the ValidateRange is incorrect powershell rejects it with the error that 340 (number) is bigger then 20160 (string)