Running Scheduled Tasks with Powershell

Deadly 提交于 2019-12-12 06:19:32

问题


I started coding in Powershell today and noticed that when I ran scheduled tasks via powershell, it wouldn't register as running in the Task Scheduler(Run "Taskschd.msc"). The code I'm using is here:

Get-ScheduledTask -TaskPath "\TaskPathHere\" | Start-ScheduledTask 

When I run a task manually(right-mouse click>Run), the status changes from Ready to Running. This isn't the case when ran from Powershell.

Question: Is there some additional parameter I need to pass to change the Status, or is this intentional behavior? If it is intentional, why?

来源:https://stackoverflow.com/questions/31480877/running-scheduled-tasks-with-powershell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!