header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

clear printer queue with PS?
Last Post 09 Apr 2008 08:05 PM by smurawski. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
kctElginUser is Offline
New Member
New Member
Posts:24

--
09 Apr 2008 07:34 PM  

Can I clear a server printer queue with PowerShell?  I'm not sure if the plan was to run it from the server, but it would be doable.

kct

smurawskiUser is Offline
New Member
New Member
Posts:45

--
09 Apr 2008 08:05 PM  
Sure thing. It can be done locally or remotely.


$printers = Get-WMIObject -Class Win32_Printer -ComputerName $computer
$printer[$index].CancelAllJobs()


where $computer is the computer name of your print server and $index is the number of that printer in the collection of printers returned by Get-WMIObject.

Good luck!
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer