Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows GetScheduled作业不存在';我不回任何工作_Windows_Powershell_Scheduled Tasks_Powershell 5.0 - Fatal编程技术网

Windows GetScheduled作业不存在';我不回任何工作

Windows GetScheduled作业不存在';我不回任何工作,windows,powershell,scheduled-tasks,powershell-5.0,Windows,Powershell,Scheduled Tasks,Powershell 5.0,我正在尝试使用PowerShell向现有计划任务添加触发器。 我正在使用Windows 10和PowerShell 5 当我跑步时: Get-Scheduled-Job -Name TASK_NAME 我收到错误消息: >Get-ScheduledJob : A scheduled job definition with Name sanityInstaller could not be found. At line:1 char:1 + Get-ScheduledJob sanityI

我正在尝试使用PowerShell向现有计划任务添加触发器。 我正在使用Windows 10和PowerShell 5

当我跑步时:

Get-Scheduled-Job -Name TASK_NAME
我收到错误消息:

>Get-ScheduledJob : A scheduled job definition with Name sanityInstaller could not be found.
At line:1 char:1
+ Get-ScheduledJob sanityInstaller
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-ScheduledJob], RuntimeException
    + FullyQualifiedErrorId : ScheduledJobDefinitionNotFoundByName,Microsoft.PowerShell.ScheduledJob.GetScheduledJobCommand
看起来,即使我在没有参数的情况下运行同一个命令,它也会返回所有作业,但会返回一个空结果

在任务计划程序中没有像
/Microsoft/Windows/PowerShell/ScheduledJobs
这样的文件夹,即使在我创建了它并且其中有一个新任务之后也不会返回它

我错过了什么

Get ScheduledJob仅获取由 使用Register ScheduledJob cmdlet的当前用户


您正在寻找cmdlet。

我有另一台运行Win7的机器,但cmdlet不起作用,有没有办法解决这个问题?谢谢您,我真的忘记了。。。我可以通过首先运行Register ScheduleJob,然后编辑作业中需要的内容来解决这个问题。此外,为了便于将来参考,Register ScheduleJob创建的任务始终使用powershell执行,其XML和结果保存在@C:\Users\MyUser\AppData\Local\Microsoft\Windows\powershell\ScheduleJobs中,在任务计划程序中,您可以在Microsoft/Windows/powershell/ScheduleJobs下找到它们