locked
Powershell command to "PAUSE" print queue for a specific printer RRS feed

  • Question

  • Hello, I'm trying to found a way to pause a print queue for a specific printer
    I have found some forums online that show gwmi but it pause / resume all printer. I would like to do that but for specific printers. Is that achievable.
    What happen is we have a software that print automatically but we want to pause the queue and then resume it later so they print all at once instead of printing randomly (the software doesn't offer that capability).
    It can be done manually of course but if we could use a powershell command we would be to automate it through taskscheduler.

    So basically we want to pause the printer and then resume it when it's time to print what is in the queue.


    Thank you



    • Edited by fr4nk1985 Monday, July 6, 2020 1:43 PM added pic
    Monday, July 6, 2020 1:41 PM

Answers

  • Have you tried selecting only the one printer from among the results returned by Get-WmiObject?

    (get-wmiobject win32_printer -filter "name='printer_name'").pause()


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Marked as answer by fr4nk1985 Monday, July 6, 2020 3:52 PM
    Monday, July 6, 2020 2:57 PM

All replies

  • I don't think you can pause a printer, but you can suspend individual print jobs. You can then resume the print jobs for that printer at a later time.

    Get-PrintJob
    Suspend-PrintJob
    Resume-PrintJob

    PrintManagement is the module with those, and many other, cmdlets.


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    Monday, July 6, 2020 2:21 PM
  • I don't think you can pause a printer, but you can suspend individual print jobs. You can then resume the print jobs for that printer at a later time.

    Get-PrintJob
    Suspend-PrintJob
    Resume-PrintJob

    PrintManagement is the module with those, and many other, cmdlets.


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    Hello, unfortunaly I need something that pause the whole printer like the "Pause Printing" option in the GUI


    • Edited by fr4nk1985 Monday, July 6, 2020 2:54 PM
    Monday, July 6, 2020 2:54 PM
  • Have you tried selecting only the one printer from among the results returned by Get-WmiObject?

    (get-wmiobject win32_printer -filter "name='printer_name'").pause()


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Marked as answer by fr4nk1985 Monday, July 6, 2020 3:52 PM
    Monday, July 6, 2020 2:57 PM
  • Have you tried selecting only the one printer from among the results returned by Get-WmiObject?

    (get-wmiobject win32_printer -filter "name='printer_name'").pause()


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    OMG!! that is what i was looking for!!! thank you very much...

    I previously find this command and tried to manipulate it but no luck
    gwmi win32_printer | % {$null = $_.pause()}

    Thank you very much for the fast answer and exactly what I needed!!!!



    Monday, July 6, 2020 3:52 PM