Reporting on printer usage
Printer usage information is useful for capacity planning, and possibly budgeting, for your shared printers. By default, printer usage details are unmonitored, but you can turn logging on (and off!). When you enable printer usage monitoring, the Windows Spooler
service writes a record to the event log for each print job containing critical usage information.
This recipe shows you how to turn on printer usage reporting and shows how to create a function to return printer usage information. This recipe creates a function that returns printer usage information as objects. Objects are easier as they enable you to process the output specifically for your environment-for example, counting the total number of pages printed, reporting on who is using the printer, and so on.
Getting ready
Run this recipe on PSRV where you have already set up a printer. This recipe assumes you have set up a printer. You also need to use the printer a bit to generate some event log entries on...