根据示例,使用:
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
最佳答案
您可能想使用通配符:
Get-EventLog system -newest 5 -After 09202016 -Message "*Something*"
关于powershell - 如何从事件日志中仅检索事件消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39733797/