簡體   English   中英

如何從Powershell腳本調用任務計划程序中的任務?

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

我已經看過關於如何安排Powershell腳本的各種文章,但我沒有看到相反的情況。 我需要從PowerShell腳本中調用Task Scheduler中的手動任務。 我正在使用Powershell 2.0。 誰能告訴我怎么做? 謝謝。

最簡單的方法可能是使用schtasks.exe

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

注意 - 在使用PowerShell 4.0的Windows 8.1預覽版中,有一個Start-ScheduledTask cmdlet。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM