イベントログを検索したりテキスト形式でエクスポートする方法 - 4thsight.xyz (2020/09/03)
例えばwevtutil qe System "/q:*[System[(EventID=1074 or EventID=7001)]]" > test1.txt
Windowsで直近10件のログオンとログオフのイベントを
テ#ログオンイベント(イベントID 4624)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624} -MaxEvents 10 | Format-Table TimeCreated, Id, Message | Out-File -FilePath "C:\path\to\logon_events.txt"
#ログオフイベント(イベントID 4634)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4634} -MaxEvents 10 | Format-Table TimeCreated, Id, Message | Out-File -FilePath "C:\path\to\logoff_events.txt"
このコマンドは、セキュリティログから直近10件のログオン(
References
[1] イベントログを検索したりテキスト形式でエクスポートする方法 - 4thsight.xyz
[2] Windows のログオン・ログオフの履歴を確認する | Windows 実践ガイド
[3] Windowsのイベントログでログオン・
一行でログオンとログオフのイベントをテキスト出力
するには、Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624,4634} -MaxEvents 10 | Format-Table TimeCreated, Id, Message | Out-File -FilePath "C:\path\to\events.txt"
このコマンドは、ログオン(イベントID 4624)とログオフ(イベントID 4634)のイベントを一度に取得し、直近10件を指定したファ
No comments:
Post a Comment