Kaseya Community

Report listing those machines with local (not network) printers

  • Hi all,

    I'm relatively new to Kaseya 2 and we have almost 2000 agents, mostly on Windows XP machines.

    I am trying to generate a report that lists all machines that have a local printer attached via USB and/or LPT. Many users have network printer ports, but I would like to exclude these. Any thoughts? I've browsed through the report options and can't seem to find (easily) what I'm looking for.

    Thanks!

    Legacy Forum Name: Report listing those machines with local (not network) printers,
    Legacy Posted By Username: belwig
  • I woudl be very interested in determinign a way to do this. I figure it shoudl be possible since Win 7 displays which locals printers are currently connected. Either this is stored in which Kaseya there shoudl be a means to capture that with a script or it is a ping through the active conenction and I would think one coudl script to run that process and report the resutls.

    If anyone has figured that out, let us know. Tryign to tack it down now.

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: franseth
  • Here's a qucik VB Script I put together that will provide the informaiton. You could run this in a Kaseya script and send the output to a file with redirection, read in the file and write it to the script log. You could then run a report from the script log. It only outputs printers that are locally connected. Note that local can also mean a local TCP/IP Port. You can modify it to get either more or less information, but this should get you started.


    strComputer = "."
    Set objNetwork = CreateObject("Wscript.Network")
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

    Set colPrinters = objWMIService.ExecQuery("Select * From Win32_Printer")
    For Each objPrinter in colPrinters
    If objPrinter.Local=True then
    Wscript.Echo "Printer Name: " & objPrinter.Name
    Wscript.Echo "Printer Port: " & objPrinter.PortName
    Wscript.Echo "Printer Local? " & objPrinter.Local
    Wscript.Echo "Printer Network? " & objPrinter.Network
    Wscript.Echo
    End If
    Next


    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: pcmnetmanage
  • Will this script be able to distinguish whcih ones are currently active vs. ones that have simply been attached but may not be presently available?

    Legacy Forum Name: General Discussion,
    Legacy Posted By Username: franseth