Print Test Page on a specific printer

This topic contains 3 replies, has 3 voices, and was last updated by  Ron 6 months, 2 weeks ago.

  • Author
  • #85372

    kate Ritter


    I would like to be able to print a testpage on a given system.

    So far I have this one-liner:

    (Get-WmiObject win32_printer -ComputerName | where {$ -eq ""}).printTestPage()

    this doesn't create an error and I can see in the printer queue that something comes in, is being spooled and then leaves the queue.

    The only problem is, that nothing is coming out of the printer. I'm ruling out a printer issue since printing the test page via the GUI works fine.

    Thank you for your help!

  • #85373

  • #86911

    kate Ritter


    thank you for the link.

    Unfortunately I can only work with PowerShell 2 on this machine...

    Therefore CIM is not an option.

    I still dont understand why my WMI command doesn't work. Since it is spooling, but physically nothing comes out of the printer 🙁

    Thank you

  • #86977


    The method you used worked for me, however, there were some differences in execution. I collected local printers into an array, then called the method on the one I wanted to test, which was a virtual printer (Print to One Note).

    $p= Get-WmiObject win32_printer

    So, in theory at least, your method should work. Try breaking it down into smaller steps and confirm each one.

You must be logged in to reply to this topic.