In a recent post , I showed how to get a list of Scheduled Tasks as objects using PowerShell and Import-CSV. In that, I included the following line of code:
In this post, I’ll try to explain why I did that.
There are a few approaches to manipulating scheduled tasks in PowerShell.
* WMI – Useful if you are only going to manipulate them via script. The tasks will not be visible in the control panel applet.
* SCHTASKS.EXE – Works ok, but has a somewhat arcane syntax, and is a text-only tool.
* Task Scheduler API -Best of both worlds, but only on Vista (not XP).