none
Printers Toner level status script

    Question

  • Hi All,

    I am looking for a powershell script to  checks for the all printers in the network and send an email about the printers less than 10%.

    Thanks

    Thursday, April 05, 2012 3:29 PM

Answers

All replies

  • Did you look in the repository under 'printers'?


    ¯\_(ツ)_/¯

    Thursday, April 05, 2012 3:42 PM
  • I'll bet you 5 points it can't be done.  I say that without even looking.

    Grant Ward, a.k.a. Bigteddy

    What's new in Powershell 3.0 (Technet Wiki)

    Thursday, April 05, 2012 3:45 PM
  • Yes i did, but all of them checks the printers queue status in the "Print Management" and it sometimes it remains in "Ready" state even if toner status is less than 10%, that's why i am looking for something different.

    Thanks

    Thursday, April 05, 2012 3:48 PM
  • Thursday, April 05, 2012 3:49 PM
    Moderator
  • Yes i did, but all of them checks the printers queue status in the "Print Management" and it sometimes it remains in "Ready" state even if toner status is less than 10%, that's why i am looking for something different.

    Thanks

    Many older printers do not update the status until you print something so you wil not be able to get it.  If it isn't in PrintManager then you will need to query the printers directly using either the API or a remote web call if the printer has a web page.  This is vendor specific and ther is really no way for any of us to know how to build a script for you printers.

    Start by asking the vendor if they have a ustiity that runs at the commandline.

    Some printers can be queried with DEVCON which can be downloaded from MS.

    Windows PRNMNGR -l can list all of the status of all printers but almost all printers that are not enterprise printers will show 'unknown'  HP Enterprise printers will show a status usually.


    ¯\_(ツ)_/¯

    Thursday, April 05, 2012 4:00 PM
  • Hi there,

    you can try though WMI Classes. If you have a Printer Server you just need to make a WMI Query in your server. You will be able to see if printers are in the state "Toner Low". (Not sure when this status triggers)

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa394363(v=vs.85).aspx

    PrinterState property

    Some properties may work, some not. It depends in manufacturer.

    Best Regards

    Saturday, April 07, 2012 3:45 PM
  • Check the DetectedErrorState property of the Win32_Printer class documented in the link Eversong posted. 5 means "low toner" and 6 means "no toner". The PrinterState property is deprecated. If this doesn't work, either the printer doesn't support it, or perhaps you need to send a document to the printer to trigger the condition.


    Richard Mueller - MVP Directory Services

    Saturday, April 07, 2012 5:16 PM
    Moderator
  • Yes i did. It depends upon the quality of printer.Some printer do not update the query. It also depends on the manufacturing of printers.
    Tuesday, June 12, 2012 11:09 AM
  • You can use Telnet. I have done it quite a bit and still do. I have yet to find a mid-range network printer that doesnt support it. SNMPGET is useful, but telnet is the icing on the cake. Win7 still has it, but you have to enable it. Once connected to the printer, use PJL or Printer Job Language to communicate. For example, http://www.irongeek.com/i.php?page=security/networkprinterhacking  @PJL RDYMSG DISPLAY="Some Text"  This website explains it just as well as I can. Write a batch file or use powershell. Dispite the age of this protocal, it is so very handy in a domain environment.

    This is the most direct way because you are in direct contact with the printer. You can get exact counts and levels, not just 'low' which is easy to get through WMI.

    • Proposed as answer by Alextricity Wednesday, March 06, 2013 2:43 AM
    • Edited by Alextricity Wednesday, March 06, 2013 3:07 AM
    Wednesday, March 06, 2013 2:43 AM