Please feel free to provide feedback or file bugs here.

Missing trigger options in New-ScheduledTaskTrigger

Votes from Connect: 3

Original Date Submitted: 10/30/2014 5:41:25 PM

********Contact Information********
Handle: ulrichb
Site Name: PowerShell
Feedback ID: 1015225

Frequency: Always Happens
Regression: Yes, this happens in all previous versions

Problem Description:
New-ScheduledTaskTrigger offers just a subset of the trigger options. Things like "On an (event log) event", or "On workstation (un)lock" are missing.

We just found ugly workarounds to add these (e.g. event log) triggers by using "schtasks.exe /create /xml" or using the COM "TaskScheduler" class.

New-ScheduledTaskTrigger should allow specifying all options the Task Scheduler UI offers. As there already exists an XML representation of these triggers (e.g. <EventTrigger>, <SessionStateChangeTrigger>, ...) it would also be possible to offer a "-Custom" parameter which takes such an XML fragment to specify a trigger.

Product Studio item created by Connect Synchronizer due to creation of feedback ID 1015225 (

Repro Steps:
Expected Results:

Internal BugId: 13076

24 votes
Sign in
Password icon
Signed in as (Sign out)

We’ll send you updates on this idea

AdminJoey Aiello [MSFT] (Program Manager, Windows Server) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Password icon
Signed in as (Sign out)
  • Al Brough commented  ·   ·  Flag as inappropriate

    New-ScheduledTaskTrigger should include a Monthly parameter. This is a standard option with Task scheduler

  • Tony Sperbeck commented  ·   ·  Flag as inappropriate

    What I just noticed is that the "On an event" trigger is now missing from the GUI for Windows Server 2016. I have not found any Microsoft documentation on this change. Has anyone else?

  • Dominique Clijsters commented  ·   ·  Flag as inappropriate

    New-ScheduledTaskTrigger should also have a trigger Option for RegistrationTriggers (On Creation / Updation), as they also can be created on theSchTasks UI.

Feedback and Knowledge Base