2016-09-27 88 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