Skip to content

Commit

Permalink
Merge pull request #142 from ThomasSteendijk/Fix/ValidateRange
Browse files Browse the repository at this point in the history
Fix: ValidateRange works not as intended because the values are strings
  • Loading branch information
NickolajA authored Mar 7, 2024
2 parents 4556dfb + 2317707 commit 5b8c605
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 5b8c605

Please sign in to comment.