如何在 Windows 2012 Server Task Scheduler 中提取所有计划作业的列表? [英] How do you pull a list of all scheduled jobs in Windows 2012 Server Task Scheduler?

查看:153
本文介绍了如何在 Windows 2012 Server Task Scheduler 中提取所有计划作业的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的任务是运行每日报告,查看我们计划在当天运行的所有作业,并检查它们是否已成功运行.现在我们在 Windows 2008 Server 上运行,并通过 Task Scheduler 安排我们的作业.我绝对不是 Windows 开发人员,所以我想知道是否可以通过 PowerShell 或其他工具提取我正在寻找的信息?

I've been tasked with running a daily report that looks at all our jobs scheduled to run on that day, and checks to see if they have successfully ran or not. For now we are running on Windows 2008 Server, and have our jobs scheduled through the Task Scheduler. I'm definitely not a Windows developer, so I'm wondering if it is possible to pull the information I'm looking for through PowerShell or some other tool?

推荐答案

针对计划任务尝试以下 PowerShell 命令

Try the following PowerShell command for scheduled tasks

   Get-ScheduledTask | Get-ScheduledTaskInfo

这将为您提供诸如上次运行任务的时间以及输出内容等信息.为了使其看起来更有条理或仅选择您需要的信息,您可以执行以下操作:

This will give you the information like when was the last time a task was run and what was the output etc. To make it look more organised or to select only information you require you can do the following:

  Get-ScheduledTask | Get-ScheduledTaskInfo | Select TaskName,TaskPath,LastRunTime,LastTaskResult

这篇关于如何在 Windows 2012 Server Task Scheduler 中提取所有计划作业的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆