Checking Scheduled Tasks Flashcards

1
Q

Which command is used to view scheduled tasks in CMD?

A

schtask

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to check the locations where tasks are scheduled to run?

A

C:\Windows\system32>schtasks | findstr Folder:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to filter out all the task names?

A

C:\Users\fpaulus.ridpharm>schtasks /query /fo LIST | findstr "TaskName"

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Write a PowerShell script that will get all scheduled tasks, loop through each task and extract and display the task name, path and execution actions

A
Get-ScheduledTask | foreach {
    $taskName = $_.TaskName
    $taskPath = $_.TaskPath
    $actions = $_.Actions.Execute
    Write-Host "Task Name: $taskName"
    Write-Host "Task Path: $taskPath"
    Write-Host "Actions: $actions"
    Write-Host "--------------------------"
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly