2

I am currently trying to design a powershell script to check if any of the printers attached to a Win Server 2003R2 have jobs stuck in the queue. so far I am doing:

Get-WmiObject -class "win32_printer" | ft shareName, queued, printerState, printerStatus

but I need to see how the results change when there is a problem. Short of just waiting until the next time I hear there is a job stuck in the queue, can anyone suggest a way to force an error? What I am looking to catch with this script is those issues wherein a job gets stuck with an error and the whole queue stops, so if I could cause that, it would be great.

1

Quite Simple, setup a printer that doesn't exist as a network printer that points to nowhere using the windows add hardware wizard. Then print stuff to it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.