+ Post New Thread
Results 1 to 5 of 5
Windows Server 2008 Thread, how to get Comment from Printer Properties to email on low toner, etc in Technical; Good morning! Odd question - I have printers listed in our 2008 print server. Certain staff get emails on low ...
  1. #1

    Join Date
    Jun 2008
    Posts
    105
    Thank Post
    33
    Thanked 3 Times in 3 Posts
    Rep Power
    13

    how to get Comment from Printer Properties to email on low toner, etc

    Good morning!

    Odd question - I have printers listed in our 2008 print server. Certain staff get emails on low toner, etc. Part of the info they need to replace the toners is listed in the comment field for each printer. Example attached
    printerComment.JPG

    I need to include in low toner email the ESI#, in this case, ESI#96556. I see no way to do this in the printer notifications section as set up my Microsoft. Does anyone know of a scripting solution I can use? Any tricks to include some sort of variable in the email message?

    The obvious workaround is for me to include the ESI# in the printer name, but this will require me to rename and push out ~250+ printers. I can do it, but would prefer another way if it's at all possible.

    Thanks!

    Damian

  2. #2

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,924
    Thank Post
    3,456
    Thanked 1,089 Times in 1,004 Posts
    Rep Power
    371
    So each printers comment field is always updated with this ESI number and you want a hta or something to enumerate all printers , you select a printer from the drop down menu and in a text field or label it shows you the comment ( and at the same time ) copies this to your clipboard so you can paste it into an email or what exactly ?

  3. #3

    Join Date
    Jun 2008
    Posts
    105
    Thank Post
    33
    Thanked 3 Times in 3 Posts
    Rep Power
    13
    Not exactly. In Printer Management, I can set up a Custom Filter and have it email staff on certain status - in this case, Toner Low. See photo:
    sendEmail.JPG
    Is there anything else I can do in the Message field to get the comment section sent along with the notification of the low toner.

    Alternatively, is there some way to pull this Comment text out via a batch or VB script? I can email it off the command line if I need to.

  4. #4

    Join Date
    Jul 2005
    Location
    Rugby
    Posts
    432
    Thank Post
    17
    Thanked 66 Times in 61 Posts
    Rep Power
    35
    Command line would be
    Code:
    wmic printer where name='<Printer Name>' get comment
    Matt

  5. #5

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,924
    Thank Post
    3,456
    Thanked 1,089 Times in 1,004 Posts
    Rep Power
    371
    vbscript and wmi - is this running from the print server itself ?

    Win32_Printer class

    Using win32_Printer you have the option for comment, there is a vbscript example near or at the bottom of said page however this is in relation to getting the default printer name and not the comment related to the said printer but it is easy enough to edit.

    Code:
    strComputer = "."
    Set objWMIService = GetObject( _    "winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set colInstalledPrinters =  objWMIService.ExecQuery("Select * from Win32_Printer Where Name='Printer_Name'")
    For Each objPrinter in colInstalledPrinters          
    Wscript.Echo "Comment: " & objPrinter.Comment    
    Next
    
    The above code snippet would run on the computer you executed the vbscript file on.
    Last edited by mac_shinobi; 27th February 2012 at 02:48 PM.



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 3
    Last Post: 10th March 2011, 08:42 PM
  2. Replies: 5
    Last Post: 9th July 2006, 04:42 PM
  3. Replies: 8
    Last Post: 12th April 2006, 12:55 AM
  4. Replies: 16
    Last Post: 29th March 2006, 04:52 PM
  5. HOW TO: XP Pro & Office 2003 Over the Network (Get Yours
    By ICTNUT in forum How do you do....it?
    Replies: 0
    Last Post: 23rd July 2005, 10:15 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •