How can I enable the Windows Server Task Scheduler History recording?

前端 未结 8 2088
夕颜
夕颜 2021-01-30 07:47

I have a Windows Server 2008 with scheduled tasks running, mainly .bat files calling PHP files. I have 2 users on the server, one Admin and the other is a Standard user.

<
8条回答
  •  臣服心动
    2021-01-30 08:09

    The adjustment in the Task Scheduler app actually just controls the enabled state of a certain event log, so you can equivalently adjust the Task Scheduler "history" mode via the Windows command line:

    wevtutil set-log Microsoft-Windows-TaskScheduler/Operational /enabled:true
    

    To check the current state:

    wevtutil get-log Microsoft-Windows-TaskScheduler/Operational
    

    For the keystroke-averse, here are the slightly abbreviated versions of the above:

    wevtutil sl Microsoft-Windows-TaskScheduler/Operational /e:true
    wevtutil gl Microsoft-Windows-TaskScheduler/Operational
    

提交回复
热议问题