Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AvailableTime validation in Add-IntuneWin32AppAssignment* #178

Open
ChristianOe opened this issue Sep 3, 2024 · 0 comments
Open

AvailableTime validation in Add-IntuneWin32AppAssignment* #178

ChristianOe opened this issue Sep 3, 2024 · 0 comments

Comments

@ChristianOe
Copy link

ChristianOe commented Sep 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant