List the Printers on a Print Server

Builds an Excel spreadsheet with information about all the printers in a print server.

4.6 Star
Add to favorites
E-mail Twitter Digg Facebook
  • Invalid outside procedure error
    1 Posts | Last post May 22, 2018
    • I am getting a outside procedure error, any have advice to fix?
  • Is it possible to capture the SNMP status and community string?
    1 Posts | Last post January 19, 2015
    • I tried adding this below and it retrieves the results I want but they do not line up with the correct printer.  I'm guessing this is because it is outside the original collection where Win32_Printer was executed.
      Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
      Set colItems = objWMIService.ExecQuery("Select * from Win32_TCPIPPrinterPort",,48)
      ' Bind to worksheet.
      Set objSheet = objExcel.ActiveWorkbook.Worksheets(Sheet)
      objSheet.Name = strComputer
      ' Populate spreadsheet cells with printer attributes.
      objSheet.Cells(1, 11).Value = "SNMP"
      objSheet.Cells(1, 12).Value = "SNMP-COM"
      'For Each objItem in colItems
      'populate the row with this printer's data
      For Each objItem in colItems
      objSheet.Cells(k, 11).Value = objItem.SNMPEnabled
      objSheet.Cells(k, 12).Value = objItem.SNMPCommunity
      k = k + 1
  • Error not output file created
    2 Posts | Last post February 11, 2014
    • If anyone can get this work (I couldn't) it would nice to have I was running it from a 2003 server on a 2003 enterprise print cluster but it failed...
    • Hopefully you found your answer - but you do have to have Excel installed on the computer you run the script from.  Other than that - what was the error?
  • Very Nice
    2 Posts | Last post February 11, 2014
    • I had to make some minor alterations to coinside with my system but this worked very nicely. One question. Is there a way to incorporate the IP address of each printer as the Port is not always that IP address in this system. 
    • I just re-found this - sorry.  I've seen HP printers create a port that is not an IP address - but have not personally seen where any others.  I've looked through the registry to find those - but had no luck.  Otherwise, if it shows an IP address for "PortAddress" - it should be correct.
  • works perfectly !
    1 Posts | Last post June 05, 2012
    • works perfectly ! Thank you