Zuerst lässt du alle Jobs anzeigen
Get-WmiObject -Query "SELECT * FROM Win32_PrintJob" | Format-Table JobId, Document, Owner, Status, HostPrintQueue
JobId Document Owner Status HostPrintQueue
----- -------- ----- ------ --------------
1 Document1.pdf Domain\User1 Paused Printer1
2 Document2.docx Domain\User2 Printing Printer2
3 Document3.xlsx Domain\User1 Error Printer1
4 Document4.txt Domain\User3 Paused Printer3
und anhand der Job ID kannst du einen Druckauftrag löschen.
Get-WmiObject -Query "SELECT * FROM Win32_PrintJob WHERE JobId='DEINE_JOB_ID'" | ForEach-Object { $_.Delete() }