Skip to content

Commit

Permalink
Fix: ValidateRange works not as intended because the values are quote…
Browse files Browse the repository at this point in the history
…d (string) instead of numbers. Fixed by removing quotes.
  • Loading branch information
ThomasSteendijk authored Feb 3, 2024
1 parent 6c5875b commit 2317707
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Public/Add-IntuneWin32AppAssignmentAllDevices.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ function Add-IntuneWin32AppAssignmentAllDevices {

[parameter(Mandatory = $false, HelpMessage = "Specify the device restart grace period in minutes.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "20160")]
[ValidateRange(1, 20160)]
[int]$RestartGracePeriod = 1440,

[parameter(Mandatory = $false, HelpMessage = "Specify a count in minutes when the restart count down display box is shown.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "240")]
[ValidateRange(1, 240)]
[int]$RestartCountDownDisplay = 15,

[parameter(Mandatory = $false, HelpMessage = "Specify a count in minutes for snoozing the restart notification, if not specified the snooze functionality is now allowed.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "712")]
[ValidateRange(1, 712)]
[int]$RestartNotificationSnooze = 240,

[parameter(Mandatory = $false, HelpMessage = "Specify the name of an existing Filter.")]
Expand Down
6 changes: 3 additions & 3 deletions Public/Add-IntuneWin32AppAssignmentAllUsers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ function Add-IntuneWin32AppAssignmentAllUsers {

[parameter(Mandatory = $false, HelpMessage = "Specify the device restart grace period in minutes.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "20160")]
[ValidateRange(1, 20160)]
[int]$RestartGracePeriod = 1440,

[parameter(Mandatory = $false, HelpMessage = "Specify a count in minutes when the restart count down display box is shown.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "240")]
[ValidateRange(1, 240)]
[int]$RestartCountDownDisplay = 15,

[parameter(Mandatory = $false, HelpMessage = "Specify a count in minutes for snoozing the restart notification, if not specified the snooze functionality is now allowed.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "712")]
[ValidateRange(1, 712)]
[int]$RestartNotificationSnooze = 240,

[parameter(Mandatory = $false, HelpMessage = "Specify the name of an existing Filter.")]
Expand Down
6 changes: 3 additions & 3 deletions Public/Add-IntuneWin32AppAssignmentGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ function Add-IntuneWin32AppAssignmentGroup {

[parameter(Mandatory = $false, ParameterSetName = "GroupInclude", HelpMessage = "Specify the device restart grace period in minutes.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "20160")]
[ValidateRange(1, 20160)]
[int]$RestartGracePeriod = 1440,

[parameter(Mandatory = $false, ParameterSetName = "GroupInclude", HelpMessage = "Specify a count in minutes when the restart count down display box is shown.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "240")]
[ValidateRange(1, 240)]
[int]$RestartCountDownDisplay = 15,

[parameter(Mandatory = $false, ParameterSetName = "GroupInclude", HelpMessage = "Specify a count in minutes for snoozing the restart notification, if not specified the snooze functionality is now allowed.")]
[ValidateNotNullOrEmpty()]
[ValidateRange("1", "712")]
[ValidateRange(1, 712)]
[int]$RestartNotificationSnooze = 240,

[parameter(Mandatory = $false, ParameterSetName = "GroupInclude", HelpMessage = "Specify the name of an existing Filter.")]
Expand Down

0 comments on commit 2317707

Please sign in to comment.