Set "Allow task to be run on demand" from the command line?

5,506

A few tidbits of information I've picked up since I posted the original question.

First, Powershell version 4, which has the best implementation of creating scheduled tasks, and includes ALL the options in the GUI, is available as a download for Windows 7 here. They're actually up to v5, but you have to install v4 first, you can't go from 2 (the one Windows 7 SP1 comes with) directly to 5. So I'll stick with 4, it has what I need.

Second, it's actually quite easy to schedule tasks in Powershell, see this article.

And finally, it's a good idea to write a wrapper DOS batch script for calling Powershell, as described here. No need for signed scripts and other annoyances. So that takes care of my reluctance to use Powershell.

Well..... sort of.....

Share:
5,506

Related videos on Youtube

Dan
Author by

Dan

Updated on September 18, 2022

Comments

  • Dan
    Dan over 1 year

    On Windows 7, is it possible to set the "Allow task to be run on demand" attribute from the command line when creating a scheduled task to be run on another Windows 7 computer (actually 9 others in a workgroup environment)?

    This task needs to be run both as a daily scheduled task and on demand. Setting a nonexistent date or trigger is not going to work, as I've seen suggested here and elsewhere.

    I'd prefer not to use XML. Powershell is acceptable as long as it fits on a command line and isn't a full script.

    I'm puzzled by this article: "The Scheduled Task module first appeared with Windows PowerShell 3.0 in Windows 8 and Windows Server 2012." Is it available on Windows 7?

    Thanks in advance.