?
Solved

Can not delete printer

Posted on 2011-09-07
3
Medium Priority
?
340 Views
Last Modified: 2012-08-13
I was remaning a printer on the server 2003 print server, guess I messed up the name because now I can not delete it and no one can print to it, I can ping it by IP.
How do I delete this printer?
printe.PNG
0
Comment
Question by:Hubman
3 Comments
 

Accepted Solution

by:
thunder88 earned 1600 total points
ID: 36497650
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters =  objWMIService.ExecQuery _
    ("Select * from Win32_Printer Where PortName ='IP_10.1.10.16'")
For Each objPrinter in colInstalledPrinters
    objPrinter.Delete_
Next

open notepad copy and paste the above code and save as whatever .vbs

change the ip address with the ip address of your printer which you want to delete

close and double click the .vbs file.

hope this'll resolve your problem.
0
 
LVL 11

Assisted Solution

by:madhatter5501
madhatter5501 earned 400 total points
ID: 36497658
try this from http://social.technet.microsoft.com/Forums/en-US/itprovistaprinting/thread/2d7f6282-3f20-43ff-a897-26db99585c1f/

1) Go to Control Panel

2) Select System and Maintenance

3) Select Administrative Tools

4) Double-click on Services

5) In the list of services, scroll down until you find one called "Print Spooler"

6) Right-click on "Print Spooler" and select "Restart"

7) The "deleted" jobs will disappear and any queued jobs in your print queue will print
0
 
LVL 1

Author Closing Comment

by:Hubman
ID: 36497696
Your script worked...Thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question