简体   繁体   中英

How to run a scheduled task in task scheduler through powers shell command

Any Powershell cmdlet to run scheduled task in task scheduler?

We have commands to Disable,Enable,Start,Stop the tasks in task schduler through powershell commands like below.But I didnt find any command to run a scheduled task which is in "Ready" state.Any idea?

Get-ScheduledTask -Taskpath "\TasksFolder\"|enable-ScheduledTask
Get-ScheduledTask -Taskpath "\TasksFolder\"|disble-ScheduledTask
Get-ScheduledTask -Taskpath "\TasksFolder\"|start-ScheduledTask
Get-ScheduledTask -Taskpath "\TasksFolder\"|stop-ScheduledTask

Use the following cmdlet to start a scheduled task from powershell:

Start-ScheduledTask -TaskPath "your task path" -TaskName "your task name"

To stop:

Stop-ScheduledTask -TaskPath "your task path" -TaskName "your task name"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM