Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看过各种关于如何安排 Powershell 脚本的文章,但我没有看到太多相反的内容。我需要从我的 PowerShell 脚本中调用任务计划程序中的手动任务。我正在使用 Powershell 2.0。谁能告诉我如何做到这一点?谢谢。
最简单的方法可能是使用schtasks.exe
schtasks.exe
& schtasks.exe /Run /TN <Name of Scheduled Task>
注意——在我的带有 PowerShell 4.0 的 Windows 8.1 预览版中,有一个Start-ScheduledTaskcmdlet。
Start-ScheduledTask