Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delegate control to delete print jobs...

Status
Not open for further replies.

andrew12

IS-IT--Management
Jun 28, 2002
56
0
0
GB
Hello,

does anyone know if it is possible to delegate control of an OU (that only contains printers) so that it is only possible to view properties and delete stalled jobs?

I delegated control of our printers OU to the service desk and created a custom task that allowed read all properties and Write printSpooling (I thought that this would give them the ability to delete stalled jobs).

I've just found out that this isn't working. Does anyone have any idea why?
 
Are there any errors involved? What does the service desk say that the error is when they attempt to delete a stalled job?
 
Thanks for that but this is quite a high level document providing an overview of delegated administration.

I need to know how to delegate control of an OU of printers so that a certain group can only read all the properties and delete print jobs...
 
The error is the standard windows Access Denied...
 
Have you thought about doing something like this:

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

Set colInstalledPrinters =  objWMIService.ExecQuery _
    ("Select * from Win32_Printer Where Name = 'HP QuietJet'")

For Each objPrinter in colInstalledPrinters
    objPrinter.CancelAllJobs()
Next

and allowing some sort of priveleged access, or, you could do a "runas" for this script...
 
Thanks very much for that. I'm afraid I'm no programmer and it doesn't mean anything to me.

There are a couple of hundred print queues that need administering.

I think I'll keep going with the delagated admin route. Either that or try and resurrect my career as a rock star.
 
The above is a quick example of a script that could be used to clear out print jobs on a specific printer. I'm sure we could come up with something that could help you out. We could actually put a question "what printer do you want to delete stuff on?" type question, the help desk types in the printer name, clicks okay, and the printer gets all of it's stuff deleted. If that sounds like something you want to do, let us know.
 
Well i'm afraid I would be little or no help but if you feel this is something that can be scripted easily I would be very grateful for help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top