Tuesday, March 24, 2020

Powershell Command to Print Test Page on a print queue



Here is a simple way to send a test print using Powershell to a print queue 

To get the name of the printers accessible to a system
Powershell
Get-CimInstance win32_printer

Pull the name of the printer you wish to test, and run the following to send a test page
Invoke-CimMethod -MethodName printtestpage -InputObject (Get-CimInstance win32_printer -Filter "name LIKE '<printer name>'")


Links
https://devblogs.microsoft.com/scripting/use-powershell-to-send-test-page-to-a-printer/