CompTIA A+ 220-1102 Practice Question
You are a system administrator tasked with ensuring that a specific server reboots every Sunday at 2 AM to apply updates. Which script, among the following, best accomplishes this task?
cron '0 2 * * 0 shutdown -r'
Register-ScheduledTask -Action (New-ScheduledTaskAction -Execute 'shutdown.exe' -Argument '/r /t 0') -Trigger (New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 2AM) -TaskName 'WeeklyReboot'
echo 'shutdown -r now' | at -t 0200 Sunday
schtasks /create /tn 'WeeklyReboot' /tr 'shutdown.exe /r /t 0' /sc weekly /d SUN /st 02:00