Use a script to interrogate the log using WMI - this is part of the
script I use to dump the data to a SQL database; this just prints it on
screen. 

Steve

sStart="20041118100000.000000+060"
sEnd=  "20041118110000.000000+060"
sServer="tconwl6"

sSQL="SELECT * FROM Win32_NTLogEvent WHERE Logfile = 'system' and
eventcode=10 and timegenerated>='" & sStart & "' and timeGenerated <'" &
sEnd & "'"
Set wbemobjectset = GetObject("winmgmts:\\" & sServer).ExecQuery(sSQL)
For Each wbemObject In wbemObjectSet
        sDetails=wbemObject.Message
  iOwnPos=instr(sDetails,"owned by")
  sDoc=left(sDetails,iOwnPos-1)
  iSpacePos=instr(iOwnPos+10,sDetails," ")
  sUser=mid(sDetails,iOwnPos+9,iSpacePos-(iOwnPos+9))
  iPrintedOnPos=instr(sDetails,"printed on")+11
  iViaPos=instr(iPrintedOnPos,sDetails,"via port")-1
  sPrinterName=mid(sDetails,iPrintedOnPos,iViaPos-iPrintedOnPos)
  iPagesPos=instr(sDetails,"pages printed")+15
  iPages=mid(sDetails,iPagesPos)
  wscript.echo sUser, sDoc, iPages
Next
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron Visser
Sent: 15 October 2004 22:56
To: ActiveDir
Subject: [ActiveDir] Getting print info from event log

Does anyone have or know anyway to pull print info out of the System
event logs so that it can be easily reviewed Example I need to know who,
how many pages now I can go thru each event and record this info by hand
but it seems rather tedious and that there should be an easier way to
gather this info.

Any help is appreciated,

Thanks,
Aaron Visser

List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to