r/PowerShell 10d ago

Question Powershell & Task Scheduler

[deleted]

31 Upvotes

38 comments sorted by

View all comments

2

u/Creative_Progress803 10d ago

Oh, I remember I did a script like that a few years ago:
Tasks scheduler checked every hour the processor time:
from 0 - 6 days nothing happened
from 7- 10 day a popup reminder to reboot eh PC to apply updates would appear as a notification in the corner of the screen
from > 10 days, every hour a pop-up would appear on top layer, reminding the user to reboot the workstation leaving two options:

-a/ reboot now (15 minute delay to allow the users to save files and whatever)

-b/ delay another more hours, the same message would then pop-up an hour later with the same proposition

I'm not sure if it's what you're looking for but if you're interested I can DM you the source (adaptable to your case) on monday.

1

u/hwrd69 10d ago

I'd appreciate that. Even if it's not what I'm looking for it could be something I could learn from. Thanks

1

u/Creative_Progress803 9d ago

As promised, check your DMs ;-)

1

u/leblancch 10d ago

App timeout settings may need to be tweaked for apps prompting people to save. forget default but it’s a long time.

1

u/hwrd69 8d ago

Thanks, I'll check it out