我只想从Security导出事件id 4624
下面的代码从安全导出所有事件(我只想要4624);
WEVTUtil query-events Security /rd:true /format:text > %~dp0Logins.txt /q:"<EventID>4624</EventID>"当所有4624个事件都被导出时,我只想用以下命令过滤事件:
<Data Name='LogonProcessName'>User32 </Data>这将是带IP的RDP日志,因为"Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational“中的日志没有IP (只有用户名) :(我听说这是因为RDP连接是TLS安全的……
发布于 2016-09-26 04:49:47
我只想从安全性导出Event ID 4624
WEVTUtil query-events Security /rd:true /format:text > "%~dp0Logins.txt"4624“
您对/q选项使用了错误的格式。
使用以下命令行:
wevtutil qe Security "/q:*[System [(EventID=4648)]]" /rd:true /f:text > "%~dp0Logins.txt"如何将筛选器限制为包含User32的Event ID 4624
当导出所有4624个事件时,我希望仅使用以下选项筛选事件:
User32
使用以下命令行:
wevtutil qe Security "/q:*[System [(EventID=4648)]]" /rd:true | findstr User32 >nul && wevtutil qe Security "/q:*[System [(EventID=4648)]]" /f:text /rd:true > "%~dp0Logins.txt"基于以下源代码链接的代码。
源How to use wevtutil command to get event details if it only comply with specific text or word
进一步阅读
https://stackoverflow.com/questions/39689081
复制相似问题