Submitted By: Rob Shannon

Deletes all the print jobs on the local computer.

Visual Basic
Edit|Remove
strComputer = "."

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters =  objWMIService.ExecQuery("Select * from Win32_Printer")

For Each objPrinter in colInstalledPrinters
    objPrinter.CancelAllJobs()
Next