0
0
PowerShellscripting~5 mins

Scheduled scripts with Task Scheduler in PowerShell - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is Task Scheduler in Windows?
Task Scheduler is a Windows tool that lets you run scripts or programs automatically at set times or events, like a reminder alarm for your computer.
Click to reveal answer
beginner
How do you create a basic scheduled task using PowerShell?
You use the <code>Register-ScheduledTask</code> cmdlet with a trigger (when to run) and an action (what to run). For example, to run a script daily at 9 AM.
Click to reveal answer
beginner
What is a 'trigger' in Task Scheduler?
A trigger is the condition or time that starts the task, like a specific time, when the computer starts, or when a user logs in.
Click to reveal answer
intermediate
Why is it important to set the correct user account for a scheduled task?
Because the task runs with that user's permissions. If the user lacks rights, the task might fail or not access needed files.
Click to reveal answer
intermediate
How can you check if a scheduled task ran successfully using PowerShell?
You can use Get-ScheduledTask and Get-ScheduledTaskInfo to see the last run time and status of the task.
Click to reveal answer
What PowerShell cmdlet is used to create a new scheduled task?
ARegister-ScheduledTask
BNew-TaskScheduler
CStart-ScheduledTask
DInvoke-Task
Which of the following is NOT a valid trigger for a scheduled task?
AAt system startup
BWhen a file is deleted
CAt log on
DDaily at a specific time
If a scheduled task needs to run even when no user is logged in, what should you do?
ASet the task to run whether the user is logged on or not
BSet the task to run only when the user is logged on
CDisable the task
DRun the task manually
Which PowerShell cmdlet helps you see the last run time of a scheduled task?
AGet-TaskHistory
BGet-TaskStatus
CGet-ScheduledTaskInfo
DShow-ScheduledTask
What happens if the user account running the scheduled task does not have permission to access a file the script needs?
AThe task will run successfully anyway
BThe task will ask for permission
CThe task will run as administrator automatically
DThe task will fail or produce errors
Explain how to schedule a PowerShell script to run daily at 7 AM using Task Scheduler.
Think about triggers and actions in Task Scheduler.
You got /4 concepts.
    Describe why setting the correct user account and permissions is important for scheduled tasks.
    Consider what happens if permissions are missing.
    You got /4 concepts.