# WMI Win32_NTLogEvent PowerShell script
Clear-Host
$Logs = Get-WmiObject -class Win32_NTLogEvent `
-filter "(logfile='Application') AND (type='error')"
$Logs | Format-Table EventCode, EventType, Message -auto
http://www.computerperformance.co.uk/powershell/powershell_win32_ntlogevent.htm#Example_2:_Refined_Script:_Returning_Only_Error_Messages_and_Only_in_The_Application_Log
Clear-Host
$Logs = Get-WmiObject -class Win32_NTLogEvent `
-filter "(logfile='Application') AND (type='error')"
$Logs | Format-Table EventCode, EventType, Message -auto
http://www.computerperformance.co.uk/powershell/powershell_win32_ntlogevent.htm#Example_2:_Refined_Script:_Returning_Only_Error_Messages_and_Only_in_The_Application_Log
Комментариев нет:
Отправить комментарий