how can I list print queues per server via power shell script RRS feed

  • Question

  • Hello,

    we are managing many print servers on our domain environment,  now for auditing purpose I need to report print queues per server,  and it seems bit difficult task doing it via GUI in print management view, could someone help me with script which gets me the no. of print queues on each print server.

    Also I need to list all the print drivers installed on each print servers. 

    I tried to list the drivers " Get-WmiObject win32_printerDriver -filter " but this will get me complete information about the driver, I need to list only the driver name (-filter) either _RELPATH or _PATH


    Tuesday, September 23, 2014 10:52 PM


All replies

  • It sounds like you need to hire a consultant. 

    Have you tried searching for "powershell pronter queues"?  I think you will find many scripts a tools for this.


    Wednesday, September 24, 2014 12:22 AM
  • Count print Qs

    add-type -AssemblyName system.printing
    $server=new-object system.printing.printserver($servername,[System.Printing.PrintSystemDesiredAccess]::EnumerateServer)


    Wednesday, September 24, 2014 12:37 AM
  • You can also use WMI like this:

    (get-WmiObject win32_printer -computer ws702).count

    I don't understand what you mean by list only.  Just select what you need.


    That will give you some basic background on how to use PowerShell to get the properties of objects.


    • Marked as answer by dhanpal mcp Wednesday, September 24, 2014 8:06 PM
    Wednesday, September 24, 2014 1:10 AM
  • I don't understand what you mean by list only -- sorry if that confused you,  "List" I mean just want to know total no. of print queues configured on a perticular print server via script.


    • Edited by dhanpal mcp Wednesday, September 24, 2014 4:47 PM
    Wednesday, September 24, 2014 4:46 PM