You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with the validation of AvailableTime with no Deadline passed:
# Validate that Available parameter input datetime object is in the past if the Deadline parameter is not passed on the command line if ($PSBoundParameters["AvailableTime"]) { if (-not($PSBoundParameters["DeadlineTime"])) { if ($AvailableTime -gt (Get-Date).AddDays(-1)) { Write-Warning -Message "Validation failed for parameter input, available date time needs to be before the current used 'as soon as possible' deadline date and time, with a offset of 1 day"; break } } }
In my opinion it doesnt make sense. AvailableTime needs to be later then 'as soon as possible'. The validation will prove if the date is in the past. But you use AvaileableTime to assign a application "now" or later. So i like to remove this.
In Intune, it's allowed to set AvailableTime to any time you like. So a validation is not needed.
The text was updated successfully, but these errors were encountered:
I have a problem with the validation of AvailableTime with no Deadline passed:
# Validate that Available parameter input datetime object is in the past if the Deadline parameter is not passed on the command line if ($PSBoundParameters["AvailableTime"]) { if (-not($PSBoundParameters["DeadlineTime"])) { if ($AvailableTime -gt (Get-Date).AddDays(-1)) { Write-Warning -Message "Validation failed for parameter input, available date time needs to be before the current used 'as soon as possible' deadline date and time, with a offset of 1 day"; break } } }
In my opinion it doesnt make sense. AvailableTime needs to be later then 'as soon as possible'. The validation will prove if the date is in the past. But you use AvaileableTime to assign a application "now" or later. So i like to remove this.
In Intune, it's allowed to set AvailableTime to any time you like. So a validation is not needed.
The text was updated successfully, but these errors were encountered: