Mitch has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::OLE qw (in); $Computername = 'servername'; $Win32_Class ='Win32_NTLogEvent'; $Class = "WinMgmts://$Computername"; $Wmi = Win32::OLE->GetObject ($Class); $if ($aevents = $Wmi->ExecQuery("SELECT * FROM $Win32_Class WHERE Logf +ileName=Application AND Eventcode=1000")) { print "yeah...$aevents\n"; # prints yeah...Win32::OLE=HASH(0x1ab5264) } foreach $aevent (in($aevents)) { # Fails here. print "$aevent{TimeGenerated}\n"; } exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WMI EventLog
by VSarkiss (Monsignor) on Feb 11, 2003 at 19:25 UTC | |
by Mitch (Sexton) on Feb 11, 2003 at 19:42 UTC | |
|
Re: WMI EventLog
by Solo (Deacon) on Feb 11, 2003 at 20:00 UTC | |
by Mitch (Sexton) on Feb 11, 2003 at 20:43 UTC | |
|
Re: WMI EventLog
by theorbtwo (Prior) on Feb 11, 2003 at 21:52 UTC | |
by theorbtwo (Prior) on Mar 17, 2003 at 01:45 UTC | |
by Solo (Deacon) on Mar 17, 2003 at 16:04 UTC |