PowerShell/イベントログの内容を確認する・Get-EventLog
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* PowerShellでイベントログの内容を確認する・Get-EventLog ...
イベントログの内容を表示する(取得する)Get-EventLogについ...
#htmlinsertpcsp(win-top.html,win-sp.html)
#contents
* 関連記事 [#ce396f7f]
-[[PowerSehllで任意のイベントログを出力する方法>PowerShel...
-[[PowerShellでイベントログを取得するサンプルコード>Power...
* Get-EventLogコマンドレット [#h6d5e639]
PowerShell ISEでGet-EventLog -LogName と入力すると以下の...
各種イベントを指定して取得することができます。
#ref(01.gif)
#br
尚、上記のLogNameのリストは以下のように一覧を表示すること...
PS D:\ps> Get-EventLog -List
Max(K) Retain OverflowAction Entries Log ...
------ ------ -------------- ------- --- ...
20,480 0 OverwriteAsNeeded 5,747 Applicatio...
20,480 0 OverwriteAsNeeded 0 HardwareEv...
512 7 OverwriteOlder 0 Internet E...
20,480 0 OverwriteAsNeeded 0 Key Manage...
128 0 OverwriteAsNeeded 11 OAlerts ...
Security ...
20,480 0 OverwriteAsNeeded 4,048 System ...
15,360 0 OverwriteAsNeeded 108 Windows Po...
* Get-EventLogの他のオプション [#b45f249c]
Get-Help Get-EventLogでみると以下の様な構文になります。
> Get-Help Get-EventLog
名前
Get-EventLog
構文
Get-EventLog [-LogName] <string> [[-InstanceId] <lon...
<datetime>] [-Before <datetime>] [-UserName <string...
formation | FailureAudit | SuccessAudit | Warning}] ...
[<CommonParameters>]
Get-EventLog [-ComputerName <string[]>] [-List] [-As...
上記の-Newestを例に実際に実行してみます。~
-LogName = Application
PS D:\> Get-EventLog -LogName Application -Newest 3
Index Time EntryType Source ...
----- ---- --------- ------ ...
6397 3 31 11:12 Information Microsoft-Windows... ...
6396 3 31 11:12 Information Microsoft-Windows... ...
6395 3 31 11:10 Information Microsoft-Windows... ...
-LogName = System
PS D:\> Get-EventLog -LogName System -Newest 3
Index Time EntryType Source ...
----- ---- --------- ------ ...
5148 3 31 10:42 Information Service Control M... ...
5147 3 31 10:39 Information Microsoft-Windows... ...
5146 3 31 10:33 Information Microsoft-Windows... ...
以上、PowerShellでEvent Logを確認するGet-EventLogコマンド...
#htmlinsertpcsp(win-btm.html,win-sp.html)
終了行:
#navi(../)
* PowerShellでイベントログの内容を確認する・Get-EventLog ...
イベントログの内容を表示する(取得する)Get-EventLogについ...
#htmlinsertpcsp(win-top.html,win-sp.html)
#contents
* 関連記事 [#ce396f7f]
-[[PowerSehllで任意のイベントログを出力する方法>PowerShel...
-[[PowerShellでイベントログを取得するサンプルコード>Power...
* Get-EventLogコマンドレット [#h6d5e639]
PowerShell ISEでGet-EventLog -LogName と入力すると以下の...
各種イベントを指定して取得することができます。
#ref(01.gif)
#br
尚、上記のLogNameのリストは以下のように一覧を表示すること...
PS D:\ps> Get-EventLog -List
Max(K) Retain OverflowAction Entries Log ...
------ ------ -------------- ------- --- ...
20,480 0 OverwriteAsNeeded 5,747 Applicatio...
20,480 0 OverwriteAsNeeded 0 HardwareEv...
512 7 OverwriteOlder 0 Internet E...
20,480 0 OverwriteAsNeeded 0 Key Manage...
128 0 OverwriteAsNeeded 11 OAlerts ...
Security ...
20,480 0 OverwriteAsNeeded 4,048 System ...
15,360 0 OverwriteAsNeeded 108 Windows Po...
* Get-EventLogの他のオプション [#b45f249c]
Get-Help Get-EventLogでみると以下の様な構文になります。
> Get-Help Get-EventLog
名前
Get-EventLog
構文
Get-EventLog [-LogName] <string> [[-InstanceId] <lon...
<datetime>] [-Before <datetime>] [-UserName <string...
formation | FailureAudit | SuccessAudit | Warning}] ...
[<CommonParameters>]
Get-EventLog [-ComputerName <string[]>] [-List] [-As...
上記の-Newestを例に実際に実行してみます。~
-LogName = Application
PS D:\> Get-EventLog -LogName Application -Newest 3
Index Time EntryType Source ...
----- ---- --------- ------ ...
6397 3 31 11:12 Information Microsoft-Windows... ...
6396 3 31 11:12 Information Microsoft-Windows... ...
6395 3 31 11:10 Information Microsoft-Windows... ...
-LogName = System
PS D:\> Get-EventLog -LogName System -Newest 3
Index Time EntryType Source ...
----- ---- --------- ------ ...
5148 3 31 10:42 Information Service Control M... ...
5147 3 31 10:39 Information Microsoft-Windows... ...
5146 3 31 10:33 Information Microsoft-Windows... ...
以上、PowerShellでEvent Logを確認するGet-EventLogコマンド...
#htmlinsertpcsp(win-btm.html,win-sp.html)
ページ名: