Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Eventlog to HTML

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,24668
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> Eventlog to HTML
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Eventlog to HTML - 8/10/2005 1:49:26 AM   
  Snipah


Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
I use this script often to get a quick glance of the Eventlog (without the hassle of clicking a thousend times)



      

< Message edited by Snipah -- 8/31/2006 10:47:37 PM >
 
 
Revisions: 1 | Post #: 1
 
 RE: Eventlog to HTML - 8/8/2007 12:33:36 AM   
  4scriptmoni


Posts: 192
Score: 0
Joined: 5/3/2007
Status: offline
Cool script!
Error Line 87 SetobjWMIService  error, sure the date format is correct?
i am still debuging to make it work here..

_____________________________

Enterprise Microsoft Scripts
Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc...
http://www.felipeferreira.net

(in reply to Snipah)
 
 
Revisions: 1 | Post #: 2
 
 RE: Eventlog to HTML - 8/8/2007 3:20:57 AM   
  ehvbs

 

Posts: 2077
Score: 50
Joined: 6/22/2005
From: Germany
Status: offline
Hi 4scriptmoni,

just in (the unlikely) case you didn't change:

SetobjWMIService = GetObject("winmgmts: ...
...
SetcolLoggedEvents1 = objWMIService.ExecQuery (...

===>

Set objWMIService = GetObject("winmgmts: ...
  ...
  Set colLoggedEvents1 = objWMIService.ExecQuery (...

[edit: overlooked some more missing spaces]:

Set colLoggedEvents  = objWMIService.ExecQuery( _
    "Select * from Win32_NTLogEvent Where TimeWritten >= '" & dtmStartDate & "' and TimeWritten <='" & dtmEndDate & "' and Type = '" & varError & "'" _
                                             )
Set colLoggedEvents1 = objWMIService.ExecQuery( _
    "Select * from Win32_NTLogEvent Where TimeWritten >= '" & dtmStartDate & "' and TimeWritten <= '" & dtmEndDate & "' and Type = '" & varWarning & "'" _
                                             )

< Message edited by ehvbs -- 8/8/2007 3:32:23 AM >

(in reply to 4scriptmoni)
 
 
Revisions: 1 | Post #: 3
 
 RE: Eventlog to HTML - 8/9/2007 1:26:30 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
Or you could do it as one line in powershell:


Get-EventLog application | ConvertTo-Html | Out-File C:\foo.html




_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to ehvbs)
 
 
Post #: 4
 
 RE: Eventlog to HTML - 8/13/2007 7:49:57 AM   
  CondoPC


Posts: 118
Score: 0
Joined: 7/23/2007
Status: offline
yes, but powershell doesn't let you pull eventlogs remotely. Can't beat the single line command tho

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: Eventlog to HTML - 8/13/2007 9:12:18 AM   
  Parabellum


Posts: 222
Score: 0
Joined: 11/12/2006
From: UK
Status: offline
i'm definately no powershell expert, so i could be wrong... but i think you can actualy
using rexec and rshell you can remotely exec commands
as I say... not a powershell expert, so could be wrong.. but maybe one of our resident PS experts could explain the commands???!

(in reply to CondoPC)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> Eventlog to HTML Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts