I want to set the value for the option "Stop task if runs longer than" in the windows schedule task Trigger tab using Powershell.

Already tried with /DU switch but it is not working.

Below is the screenshot for the same.
[![Windows Task Schedule Trigger Settings](https://i.stack.imgur.com/b3g7m.png)](https://i.stack.imgur.com/b3g7m.png)

let me know in case of any further information is required.

@TobyU: I tried your suggestion as well but it is not setting up the required value. Below is the screenshot for your reference.
[![enter image description here](https://i.stack.imgur.com/y5Yae.png)](https://i.stack.imgur.com/y5Yae.png)

Thank you in advance.