Task schedular is brilliant because you can schedule things to run on certain days and times but what about if you looking for a scheduled task but there are so many folders to sift through to find them? PowerShell is the answer, you can run a single command to find all the tasks running on that server.
This may also be a good thing if you are infected and something is triggering on a scheduled time, you might be able to pin point it in the list. Here is the command:
- Get-ScheduledTask
Here is an example on Windows Server 2016:
and you can do the same thing with PowerShell V7 as per below:
The list is quite long but you get the just of it. Much easier than opening up Scheduled Tasks and going through all the folders to find something.
You can also narrow it down to a specific task by using the following command:
- Get-ScheduledTask -TaskName “XYZ”
The above is useful if you know what you looking for, you can also search for the Scheduled Task by TaskPath.
Hope it helps.