Scripts to run at set time

Scripts to run at set time

I have a powershell script I have written which basically prompts the user to reboot their machine if it hasn't been for a set number of days.

I am wanting this to run once a day at a specific time. If conditions are met, there will be pop up windows with prompts. If conditions are not met (well done user) they will not see anything.

I have tried to create this as a scheduled task however, this fails as none of the windows that pop up can be see as they are running in a different context. In order to see the windows, the task needs to be run as the logged in user.

I am unable to see any way of setting a scheduled task to run as the current user and if I set up a script, it will either run every refresh cycle (90 minutes) or other scenarious which are no good to my requirements.

Is there a way to create a scheduled task to run as the target user or to have a script run on a schedule?

Thank you,
Simon

                New to ADSelfService Plus?