Checking Scheduled Tasks Flashcards
1
Q
Which command is used to view scheduled tasks in CMD?
A
schtask
2
Q
How to check the locations where tasks are scheduled to run?
A
C:\Windows\system32>schtasks | findstr Folder:
3
Q
How to filter out all the task names?
A
C:\Users\fpaulus.ridpharm>schtasks /query /fo LIST | findstr "TaskName"
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 "--------------------------" }