Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Properties of the get-eventlog cmdlet?

4 views
Skip to first unread message

Raheem

unread,
Nov 2, 2009, 6:20:59 PM11/2/09
to
Hi,

I'd like to find the methods and properties of the get-eventlog
cmdlet. But when I try "get-member | get-eventlog" it does not do what
I expect it to. Is there some other way to find the properties for the
get-eventlog cmdlet? Thanks.

- Raheem

Larry__Weiss

unread,
Nov 2, 2009, 7:13:07 PM11/2/09
to
Try:

get-eventlog -List | get-member
get-eventlog -List | fl *

Then for each log (using System log as an example)

get-eventlog System | get-member
get-eventlog System | fl *

- Larry

Martin Zugec

unread,
Nov 5, 2009, 6:02:02 PM11/5/09
to
Code from Larry will work perfectly, so this is just FYI.

More generic approach I like to use sometimes is this:
[System.Diagnostics.EventLog].GetMembers() | Where {$_.MemberType -match
"Property|Method"} | Select Name, MemberType

Of course you can change [System.Diagnostics.EventLog] to any class.
Advantage is that you don't need to have object instance.

Martin

"Larry__Weiss" <l...@airmail.net> wrote in message
news:usDyspBX...@TK2MSFTNGP06.phx.gbl...

Larry__Weiss

unread,
Nov 5, 2009, 7:30:04 PM11/5/09
to
Why does that return multiple output with the same Name and MemberType ?

- Larry

Martin Zugec

unread,
Nov 6, 2009, 1:37:09 AM11/6/09
to
My initial guess would be overloaded methods...

Martin

"Larry__Weiss" <l...@airmail.net> wrote in message

news:euYjKhnX...@TK2MSFTNGP06.phx.gbl...

0 new messages