Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to retrieve printer status and # jobs in queue?

$
0
0

Hi all,

I have to admit upfront that although I've got experience with VB and have done some Java and a bit of Python, PowerShell is new and confusing to me! I am really hoping someone here can help me!

What I want: I am ICT support at a primary school and I am looking for an easy way to monitor the printers on the network. Specifically I would like to be able to check quickly (for each printer): Whether there is currently an error and what that error is (e.g. Out of Black Toner), and the number of outstanding jobs in the print queue. 

So far I have got:

get-wmiobject win32_printer | Select-Object DeviceID,DriverName, PortName, PrinterStatus, PrintJobDataType, PrintProcessor, ExtendedPrinterStatus, ExtendedDetectedErrorStatus, ErrorInformation, ErrorDescription, DetectedErrorState, ConfigManagerErrorCode, Comment, Caption, Availability

However my ExtendedPrinterStatus always shows "2" (unknown), and my PrinterStatus always shows "2" (idle), even for a printer that I know has an error and is showing in Devices and Printers as having an error. This may be because it is offline, but the Availability is showing as blank.

Can anyone suggest any solutions or better approaches, pretty please?

Thanks!

~Shiv


Viewing all articles
Browse latest Browse all 6937

Trending Articles