Thanks for posting this.
Like you, I found that I was unable to create a scheduled task using the format for times shown in some of the examples on https://learn.microsoft.com/en-us/powershell/module/scheduledtasks/new-scheduledtasksettingsset?view=windowsserver2022-ps
For example IdleDuration 00:05:00 -IdleWaitTimeout 01:00:00
HOWEVER, the problem is, the examples are WRONG.
When you look at the definition of New-ScheduledTaskSettingsSet inthe same page, it sayd clearly that IdleDuration and IdleWaitTimeout are of TYPE TimeSPAN!!
Therefore they are not specified as HH:MM:SS but as "New-TimeSpan".
-IdleDuration (New-TimeSpan -Minutes 5) -IdleWaitTimeout (New-TimeSpan -Hour 2)
If you use this approach you CAN create a scheduled task using Register-ScheduledTask and New-ScheduledTaskSettingsSet, with values specified for IdleDuration and IdleWaitTimeout