Powershell 如何仅从事件日志中检索事件的消息?
根据示例,使用:Powershell 如何仅从事件日志中检索事件的消息?,powershell,Powershell,根据示例,使用: 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 + Ca
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:未找到匹配项
第1行字符:13
+获取事件日志您可能希望使用通配符:
Get-EventLog system -newest 5 -After 09202016 -Message "*Something*"
谢谢,这非常有效,如果需要搜索特定类型的消息,这非常有用。