http://msdn.microsoft.com/en-us/library/windows/desktop/bb736357(v=vs.85).aspx
It is not possible to go down in the V2 world, but it will do everything you need and can be called directly from powershell
Edit:
This question made me think, and I realized that your script is a little different from mine, so it should be possible. Therefore, I used to be wrong. It turns out that comobject Scheduler.service is compatible with Powershell 2.0, but also works only with Task Scheduler 2.0. I thought this was not because I was on xp, and Task Scheduler 2.0 was only available in Vista and above.
Looking at the source code of this MS PowershellPack, I found that all it does is use the Scheduler.service com object. https://github.com/sushihangover/SushiHangover-PowerShell/tree/master/modules/TaskScheduler
For a good guide on managing this com object for yourself: https://blogs.technet.microsoft.com/heyscriptingguy/2009/04/01/hey-scripting-guy-how-can-i-best-work-with-task -scheduler /
And the answer to your question: How to set the schedule.service "Run whether the user was enabled or not" in Powershell?
Sorry for misunderstanding. I will not let this happen again: D
In any case, schtasks.exe will cover all your databases, and IMO is easier to work with, because it is one command and does not require Invoke-Session when scheduling a task on a remote server.
source share