presents by IT Consulting 109

PowerShell – イベントログ情報を取得

概要

イベントログの情報を取得する方法について記載しています。

 

手順

次のコマンドを実行します。

Get-EventLog -list

実行結果

  Max(K) Retain OverflowAction        Entries Log
  ------ ------ --------------        ------- ---
  20,480      0 OverwriteAsNeeded       2,279 Application
  20,480      0 OverwriteAsNeeded           0 HardwareEvents
     512      7 OverwriteOlder              0 Internet Explorer
  20,480      0 OverwriteAsNeeded           0 Key Management Service
     128      0 OverwriteAsNeeded           0 OAlerts
                                              Security
  20,480      0 OverwriteAsNeeded       1,641 System
  15,360      0 OverwriteAsNeeded         109 Windows PowerShell

OverflowAction

OverwriteOlder イベントを上書きしないで必要に応じてアーカイブする
OverwriteAsNeeded 必要に応じてイベントを上書きする(最も古いイベントから)
DoNotOverwrite イベントは上書きしない(ログは手動で消去)

 

補足

ファイルに出力する場合、次のコマンドを実行します。

Get-EventLog -list | Export-Csv -encoding Default EventLog.csv
この記事を書いた人
名前:TRUE's。 千葉県育ち、神奈川県在住のIT系フリーエンジニア。 IT系のナレッジサイトを不定期で更新中。 フォトグラファー兼エンジニアとして日々勤しんでいる。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny