Printer monitoring script (PowerShell)

Posted by HannesFostie on Server Fault See other posts from Server Fault or by HannesFostie
Published on 2010-04-23T10:52:48Z Indexed on 2010/04/29 14:27 UTC
Read the original article Hit count: 388

I am going to write a script of some sort to check event viewer in a windows server 2003 for all printjobs, and then write them to a comma delimited textfile like printername_floor_room.txt

I am wondering what the best way is to do this realtime, and keep checking the event viewer constantly. Any caveats I need to be aware of?

Thanks

EDIT: Okay, so I will most likely go for PowerShell and use Get-EventLog and then edit the "table" data. Problems I'm having: if I were to save all this data to a text file, how do I get the data out of it? A comma-separated file I could work with, but this, I'm not really sure. And once that is sorted out, I'm still not sure how to keep the file updated more or less real-time. Can I make this service-like, without hogging up all resources? Run it every x seconds for example?

© Server Fault or respective owner

Related posts about printer

Related posts about script