Purpose
Create a scheduled task to reboot one server
Information
COMMAND:
Register-ScheduledJob Reinicio {Restart-Computer -Force} -Trigger (New-JobTrigger -At 22:00 -DaysOfWeek "Friday" -weekly) -ScheduledJobOption (New-ScheduledJobOption -RunElevated)
This command add to system one new task, you can verify and finished of planning opening scheduler task and...
Other examples:
Daily
Register-ScheduledJob Reinicio {Restart-Computer -Force} -Trigger (New-JobTrigger -At 22:00 -Daily) -ScheduledJobOption (New-ScheduledJobOption -RunElevated)
Weekly
Register-ScheduledJob Reinicio {Restart-Computer -Force} -Trigger (New-JobTrigger -At 22:00 -weekly) -ScheduledJobOption (New-ScheduledJobOption -RunElevated)
Other option:
by GU | Published: December 27 2022 | Last Updated: January 9 2023
No hay comentarios:
Publicar un comentario