This works for that eventID on my server 2008R2 box (found one to poke at...)
Get-EventLog -LogName application -Source "winmgmt" | ?{$_.eventid -eq 10} |
select EventID, Source, TimeGenerated, Message, machinename
You can remove the where statement if you want all wmi events.
Matt
From: [email protected] [mailto:[email protected]] On
Behalf Of Kelley, Matthew
Sent: Tuesday, March 01, 2016 12:46 PM
To: [email protected]
Subject: [powershell] RE: Question on using Get-EventLog for WMI errors
Without having one of those events to poke at, the best I can say is to get an
instance of one and do a select * to see what all property values you have to
work with. Maybe there is one that isn't dumped in the default view that you
can use to get what you need.
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Webster
Sent: Tuesday, March 01, 2016 12:31 PM
To: [email protected]<mailto:[email protected]>
Subject: [powershell] Question on using Get-EventLog for WMI errors
Server 2008 R2 still on V2. Needing to query 389 servers for WMI error 10. I
can see the error in the Application event log:
[cid:[email protected]]
When I use Get-EventLog, this is what I get for that specific event:
1371838 Mar 01 05:57 0 WinMgmt 3221231089 The
description for Event ID '-1073736207' in Source 'WinMgmt' cannot be found.
The local computer may not have the necessary registry information or message
DLL files to display the message, or you may not have permission to access
them. The following information is part of the event:
I am logged in as the local admin on the server so it should not be a
permissions issue. Is this just a known issue with Get-EventLog or is there
something else I should doing or using?
Every WinMgmt event retrieved using Get-EventLog returns the same basic message
"the description for the event cannot be found". Kind of useless info for
finding the real error. Also, why in the Application event log is the Event ID
10 but the cmdlet returns 3221231089?
Thanks
Carl Webster
Citrix Technology Professional
http://www.CarlWebster.com<http://t.sidekickopen01.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJN7t5XYgdV8QRW2zWLDn4XrdjzW7fK3rs56dwxZf67wwsR02?t=http%3A%2F%2Fwww.carlwebster.com%2F&si=6012126861197312&pi=4311b7b1-332d-4242-8585-36954b184dc7>
The Accidental Citrix Admin
================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be
used for urgent or sensitive issues
================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be
used for urgent or sensitive issues
================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1