如何创建批处理脚本,以便每5分钟查找一个特定的事件ID(Eventid:26),并在windows server 2003 r2中执行某些命令?

如何创建批处理脚本,以便每5分钟查找一个特定的事件ID(Eventid:26),并在windows server 2003 r2中执行某些命令?,windows,batch-file,windows-server-2003,event-viewer,event-id,Windows,Batch File,Windows Server 2003,Event Viewer,Event Id,如何创建批处理脚本以每5分钟查找一个特定的事件ID(Eventid:26),如果发现事件ID为26,则在windows server 2003 r2中执行某些命令(杀死特定的windows服务并重新启动它?来自schtasks/create/? ==> Creates a scheduled task "EventLog" to run wevtvwr.msc starting whenever event 101 is published in the System channe

如何创建批处理脚本以每5分钟查找一个特定的事件ID(Eventid:26),如果发现事件ID为26,则在windows server 2003 r2中执行某些命令(杀死特定的windows服务并重新启动它?

来自
schtasks/create/?

==> Creates a scheduled task "EventLog" to run wevtvwr.msc starting
    whenever event 101 is published in the System channel

    SCHTASKS /Create /TN EventLog /TR wevtvwr.msc /SC ONEVENT
             /EC System /MO *[System/EventID=101]


有很多任务要执行。即使对于具有管理权限的用户,也不可能终止某些服务。事件ID 26是一个特定的用户注销,需要执行哪些其他任务?(注销时,该会话的所有打开程序都将关闭)。
==> Creates a scheduled task "logtracker" on remote machine "ABC"
    to run notepad.exe every five minutes starting from the
    specified start time with no end time. The /RP password will be
    prompted for.

    SCHTASKS /Create /S ABC /U domain\user /P password /SC MINUTE
             /MO 5 /TN logtracker
             /TR c:\windows\system32\notepad.exe /ST 18:30
             /RU runasuser /RP