I have the following cmdlts to ceate a schedule in psu and it works just fine
New-PSUSchedule -Script $Script -TimeZone ‘UTC’ -OneTime $Schedule -Environment “7.4.1” -Tenant $($($EventData.TaskName).Replace(‘_ETL’,‘’)) -PSComputerName $($EventData.PSComputerName) -Task $($EventData.TaskName)
it creates the schedule with no problem but if i stop/start psu apppool in IIS the schedule is gone.
I have tested all PSU V4 versions and tried to create a simple schdeule from the admin console and its the same issue.
what i have noticed is the schedule.ps1 script is not created when you chose onetime schedule and thats why stop/start apppool in IIS will make the schedule in the admin console disappear.
if i chose cron job i can see schedule.ps1 script created and the schedule remain in the admin console.
i have tested on many computers with all PSU 4 versions and same results i cannot create a save a onetime schedule in PSU using the console nor New-PSUSchedule command.
Please advice.