View Single Post
Old 07-21-2007   #5 (permalink)
dreeschkind


 
 

Re: Cancel a print job from the shell

Try this:

Get-WmiObject Win32_Printer -computerName HAL9000 | Where {$_.Name -eq
"Microsoft XPS Document Writer"} | ForEach { $_.CancelAllJobs() }

--
greetings
dreeschkind

"NormyB" wrote:

> On Jul 19, 8:14 pm, "Kiron" <Ki...@HighPlainsDrifter.com> wrote:
> > Try PrintSystemJobInfo Class' Cancel Method.
> > You may need to load its assembly, System.Printing (system.printing.dll)
> >
> > http://msdn2.microsoft.com/en-us/lib...g.printsystemj...
> >
> > --
> > Kiron

>
> Thanks Marco
>
> I did find Wni32_PrintJob which has a method CancelAllJobs() but I'm
> not sure how to use it, or more accuratly stated, I dont know how to
> use it to tell a specfic printer on a print share to cancell all
> jobs.
>
>
> Thanks again,
>
> Norm
>
>

My System SpecsSystem Spec