user1911835
user1911835

Reputation: 55

How to call a task in Task Scheduler from a Powershell script?

I have seen various articles on how to schedule a Powershell script, but I have not see much of the reverse. I need to call a manual task in Task Scheduler from my PowerShell script. I am using Powershell 2.0. Can anyone show me how to do this? Thanks.

Upvotes: 0

Views: 485

Answers (1)

Andy Arismendi
Andy Arismendi

Reputation: 52567

The simplest way may be to use schtasks.exe

& schtasks.exe /Run /TN <Name of Scheduled Task>

NOTE -- on my Windows 8.1 preview with PowerShell 4.0 there is a Start-ScheduledTask cmdlet.

Upvotes: 3

Related Questions