how to delete orphaned print shares

Posted on 2007-07-31
Last Modified: 2013-12-15
2003 SP1 running terminal services - around 50 users on-line.
recently installed laserjet 4240n - qty 13
worked fine for a few weeks
just updated driver from PC5 to PC6
came in and these 13 printers were 'gone'

now seem to have orphaned printer shares for these 13 printers
try to delete the shares with following:

Net Share xxx /DELETE  
System error 1801 has occurred.

The printer name is invalid.

The printer was defined, became 'orphaned' (not sure how) but now I can go back and define but when I go to share using orig "xxx" shared named it gives:

Share name already exists.

It does work with diff shared name but applications are semi hard coded to orig share name.  And, I don't want to have a bunch of obsolete shares left.

QUESTION:  how do I delete orphaned print shares?  Is it done in active directory or on the server?

Note - I have toggled the Print spooler on the server.  This is a production terminal server so I can't just reboot during the day.
Question by:alpertgrp
    LVL 19

    Expert Comment

    Check this registry key:
    HKLM \ System \ CurrentControlSet \ Services \ lanmanserver \ Shares

    You may be able to delete the orphaned printers from there.

    Author Comment

    if I delete from there will it update active directory?
    LVL 19

    Expert Comment

    I would delete them there first. If they don't remove themselves from AD (which they should) then you can use something like ADSIEDIT.msc to remove them manually from AD.

    Using ADSIEDIT.msc you'd navigate to Domain -> DC=<yourdomain>,DC=com -> drill down to the OU that contains your print server -> when you click on the server in the left pane, the printer shares should show in the resultant window on the right.

    Author Comment

    Restart of "Server" service and "Print Spooler" seems to have deleted the old Share Names - however, since I had to get these printers up/running ASAP I did re-install using new name and new Share name.  I'm going to watch over the next few days to make sure we are stable the go back and delete the 'old' / 'obsolete' / 'orphaned' entries.
    LVL 19

    Accepted Solution

    Good deal - thanks for the update.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    A quick step-by-step overview of installing and configuring Carbonite Server Backup.
    Learn about cloud computing and its benefits for small business owners.
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now