2016-09-27 84 views
1

每例如,使用:如何從事件日誌中檢索事件的消息?

Get-EventLog system -newest 5 -After 09202016 -Message "Something", 

正在考慮「東西」可能是消息的是正在尋找的類型。

雖然我沒有得到任何比賽:

Get-EventLog : No matches found 
At line:1 char:13 
+ Get-EventLog <<<< system -newest 5 -After 09202016 -Message The 
    + CategoryInfo   : ObjectNotFound: (:) [Get-EventLog], ArgumentException 
    + FullyQualifiedErrorId : GetEventLogNoEntriesFound,Microsoft.PowerShell.Commands.GetEventLogCommand 

回答

1

你可能想使用通配符:

Get-EventLog system -newest 5 -After 09202016 -Message "*Something*" 
+0

謝謝你,偉大工程,真正有用的,如果需要搜索特定類型的信息。 – JDavila