get-eventlog

Powershell Get_EventLog for multiple servers

半腔热情 提交于 2019-12-12 03:43:49
问题 I'm a SQL DBA, n00b to Powershell, tasked with sysadmin duties at the moment I need to query error logs across my servers for Errors and Warnings. Using my own Google-fu and help from this thread I was able to get this working: $computers = Get-Content "C:\Servers\ServerList_Short.txt"; # QUERY COMPUTER SYSTEM EVENT LOG foreach($computer in $computers) { Get-EventLog -ComputerName $computer -LogName System -EntryType "Error","Warning" -After (Get-Date).Adddays(-7) ` | Select-Object -Property

Get-EventLog - valid message missing for some event log sources

自古美人都是妖i 提交于 2019-12-07 05:43:41
问题 I'm pulling and filtering System Event Log data using get-eventlog. What I'm finding is that get-event log is not able to correctly return the message associated with some entries. These entries appear normally in the event log viewer. E.g. get-eventlog -logname system | ? { $_.source -eq "Microsoft-Windows-Kernel-General" } returns 8 entries, all of which have a message of the following form: The description for Event ID '12' in Source 'Microsoft-Windows-Kernel-General' cannot be found. The

Get-EventLog - valid message missing for some event log sources

[亡魂溺海] 提交于 2019-12-05 10:27:30
I'm pulling and filtering System Event Log data using get-eventlog. What I'm finding is that get-event log is not able to correctly return the message associated with some entries. These entries appear normally in the event log viewer. E.g. get-eventlog -logname system | ? { $_.source -eq "Microsoft-Windows-Kernel-General" } returns 8 entries, all of which have a message of the following form: The description for Event ID '12' in Source 'Microsoft-Windows-Kernel-General' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the